File tree Expand file tree Collapse file tree
tests/Ackintosh/Ganesha/Storage/Adapter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -413,6 +413,9 @@ public function outdatedCountsShouldBeEvictedInCaseOfRateStrategy(): void
413413 ->intervalToHalfOpen (10 )
414414 ->build ();
415415
416+ // Ensure memcache is cleared
417+ sleep (1 );
418+
416419 // Record successes.
417420 // Since Memcached adapter implements `TumblingTimeWindow`, the count is recorded into a key which based on timestamp.
418421 $ serviceName = 'outdatedCountsShouldBeEvicted ' ;
@@ -441,8 +444,8 @@ public function outdatedCountsShouldBeEvictedInCaseOfRateStrategy(): void
441444 (int )$ this ->memcached ->get ($ failureKeyForTheTumblingTimeWindow )
442445 );
443446
444- // Since sleeping 15 seconds as below, the `TumblingTimeWindow` contains the success count recorded above is outdated.
445- sleep (15 );
447+ // Since sleeping 10 seconds as below, the `TumblingTimeWindow` contains the success count recorded above is outdated.
448+ sleep (10 );
446449
447450 // The count should be got cleared as the `TumblingTimeWindow` is outdated at this point.
448451 self ::assertFalse ($ this ->memcached ->get ($ successKeyForTheTumblingTimeWindow ));
You can’t perform that action at this time.
0 commit comments