Comments (7)
Hi @chengangcode , thank you for reporting this issue.
I've run the tests locally with latest master but the failures aren't reproduced.
$ docker-compose up
Starting mongo ... done
Starting redis ... done
Starting memcached ... done
Starting server ... done
Starting client ... done
...
...
$ docker-compose run --rm -w /tmp/ganesha -u ganesha client vendor/bin/phpunit
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
............................................................... 63 / 102 ( 61%)
....................................... 102 / 102 (100%)
Time: 39.12 seconds, Memory: 14.00MB
OK (102 tests, 160 assertions)
Could you please let me know the versions you are using? (Ganesha, PHP, OS)
from ganesha.
Builder::buildWithCountStrategy use RedisAdapter
docker-compose run --rm -w /tmp/ganesha -u ganesha client vendor/bin/phpunit Ackintosh/GaneshaTest /tmp/ganesha/tests/Ackintosh/GaneshaTest.php
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
FFF.FFFF. 9 / 9 (100%)
Time: 928 ms, Memory: 8.00MB
There were 7 failures:
- Ackintosh\GaneshaTest::recordsFailureAndTrips
Failed asserting that true is false.
/tmp/ganesha/tests/Ackintosh/GaneshaTest.php:42
- Ackintosh\GaneshaTest::recordsSuccessAndClose
Failed asserting that true is false.
/tmp/ganesha/tests/Ackintosh/GaneshaTest.php:55
-
Ackintosh\GaneshaTest::notifyTripped
Expectation failed for method name is equal to string:receive when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times. -
Ackintosh\GaneshaTest::failureCountMustNotBeNegative
Failed asserting that true is false.
/tmp/ganesha/tests/Ackintosh/GaneshaTest.php:116
- Ackintosh\GaneshaTest::withIntervalToHalfOpen
Failed asserting that true is false.
/tmp/ganesha/tests/Ackintosh/GaneshaTest.php:132
- Ackintosh\GaneshaTest::disable
Failed asserting that true is false.
/tmp/ganesha/tests/Ackintosh/GaneshaTest.php:152
- Ackintosh\GaneshaTest::reset
Failed asserting that true is false.
/tmp/ganesha/tests/Ackintosh/GaneshaTest.php:169
FAILURES!
Tests: 9, Assertions: 14, Failures: 7.
from ganesha.
from ganesha.
@happylhb Thanks your comment. You mean that the unit tests fails if we set Redis adapter here instead of the Memcached adapter?
from ganesha.
@ackintosh yes
from ganesha.
@happylhb Unfortunately Redis Adapter doesn't support the Count strategy for now. 😢
ganesha/src/Ganesha/Storage/Adapter/Redis.php
Lines 67 to 70 in df94cba
ganesha/src/Ganesha/Storage/Adapter/Redis.php
Lines 87 to 90 in df94cba
From your comment, I've noticed we should update that make Ganesha throws Exception if using Redis Adapter with the counting strategy so that users can notice that is unsupported. 💡
from ganesha.
Now we can notice that an adapter doesn't support the strategy as an exception is thrown if so.
#36
And I've opened the issue to track the status of a support for Redis + Count.
#37
from ganesha.
Related Issues (20)
- Symfony HTTPClient ServiceNameExtractor doesn't support base_uri
- Support for psr/http-message 2 HOT 3
- Call to undefined function GuzzleHttp\Promise\promise_for() HOT 1
- Redis Adapter does not initialise status HOT 3
- intervalToHalfOpen not work for Redis storage HOT 2
- Redis adapter: Count strategy support HOT 3
- Documentation on strategies HOT 3
- Drop PHP5.x support
- Packagist not listing v0.4.2 HOT 3
- Redis Success key keeps growing HOT 5
- Thanks @Wikia for using Ganesha HOT 1
- Better validation for build parameters
- PHPStan HOT 2
- Symfony HttpClient Integration HOT 2
- Success key cleanup - Redis adapter HOT 12
- [GuzzleMiddleware + GaneshaHttpClient] Option to trigger failure on 5xx response HOT 2
- Drop PHP7.1 and 7.2 support
- 1.2.0 Release backwards incompatibility HOT 3
- MongoDB adapter - SlidingTimeWindow support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ganesha.