Skip to content

Commit 73a2312

Browse files
committed
fix test
1 parent 3f489e3 commit 73a2312

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/RedisConnectionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ public function testSerialize()
102102
public function testConnectionTimeout()
103103
{
104104
$db = $this->getConnection(false);
105-
$db->configSet('timeout', 1);
105+
$db->configSet('timeout', 2);
106106
$this->assertTrue($db->ping());
107107
sleep(1);
108108
$this->assertTrue($db->ping());
109-
sleep(2);
109+
sleep(3);
110110
if (method_exists($this, 'setExpectedException')) {
111111
$this->setExpectedException('\yii\redis\SocketException');
112112
} else {
@@ -122,7 +122,7 @@ public function testConnectionTimeoutRetry()
122122

123123
$db = $this->getConnection(false);
124124
$db->retries = 1;
125-
$db->configSet('timeout', 1);
125+
$db->configSet('timeout', 2);
126126
$this->assertCount(3, $logger->messages, 'log of connection and init commands.');
127127

128128
$this->assertTrue($db->ping());
@@ -131,7 +131,7 @@ public function testConnectionTimeoutRetry()
131131

132132
$this->assertTrue($db->ping());
133133
$this->assertCount(5, $logger->messages, 'log +1 ping command.');
134-
sleep(2);
134+
sleep(3);
135135

136136
// reconnect should happen here
137137

0 commit comments

Comments
 (0)