Skip to content

Commit 9cc9efb

Browse files
committed
remove test
1 parent f8d0a92 commit 9cc9efb

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

tests/RedisConnectionTest.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,14 @@ public function testSerialize()
9999
$this->assertTrue($db2->ping());
100100
}
101101

102-
public function testConnectionTimeout()
103-
{
104-
$db = $this->getConnection(false);
105-
$db->configSet('timeout', 2);
106-
$this->assertTrue($db->ping());
107-
sleep(1);
108-
$this->assertTrue($db->ping());
109-
sleep(3);
110-
$this->expectException('\yii\redis\SocketException');
111-
$this->assertTrue($db->ping());
112-
}
113-
114102
public function testConnectionTimeoutRetry()
115103
{
116104
$logger = new Logger();
117105
Yii::setLogger($logger);
118106

119107
$db = $this->getConnection(false);
120108
$db->retries = 1;
121-
$db->configSet('timeout', 2);
109+
$db->configSet('timeout', 1);
122110
$this->assertCount(3, $logger->messages, 'log of connection and init commands.');
123111

124112
$this->assertTrue($db->ping());
@@ -127,7 +115,7 @@ public function testConnectionTimeoutRetry()
127115

128116
$this->assertTrue($db->ping());
129117
$this->assertCount(5, $logger->messages, 'log +1 ping command.');
130-
sleep(3);
118+
sleep(2);
131119

132120
// reconnect should happen here
133121

0 commit comments

Comments
 (0)