Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2022-10-21 00:47:44 +0300
committerMichael Grunder <michael.grunder@gmail.com>2022-10-21 01:04:45 +0300
commit5dcf3f802b70ecd588a9262c0d441d2160b0909d (patch)
treefad9ef2c5cedfe6c00ffec009b877fe7775e7801
parentd87f1428260b9270de6d0b7cef253057197f2987 (diff)
Newer versions of Redis shouldn't need a long delay
-rw-r--r--tests/RedisTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/RedisTest.php b/tests/RedisTest.php
index 2dc654dc..6c02767d 100644
--- a/tests/RedisTest.php
+++ b/tests/RedisTest.php
@@ -5675,10 +5675,10 @@ class Redis_Test extends TestSuite
// Time out after 1 second.
$this->redis->config('SET', 'timeout', '1');
- // Wait for the timeout. With Redis 2.4, we have to wait up to 10 s
- // for the server to close the connection, regardless of the timeout
- // setting.
- sleep(11);
+ // Wait for the connection to time out. On very old versions
+ // of Redis we need to wait much longer (TODO: Investigate
+ // which version exactly)
+ sleep($this->minVersionCheck('3.0.0') ? 2 : 11);
// Make sure we're still using the same DB.
$this->assertEquals($value, $this->redis->get($key));