Skip to content

Commit abcf4c9

Browse files
committed
Fixed start redis on tests
Added start redis timeout
1 parent 3537d4d commit abcf4c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/DataMapper/Redis/RedisImplementationIntegrationTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public static function setUpBeforeClass()
3535
);
3636

3737
wait(call(function (Process $dbProcess) {
38+
$startTime = time();
3839
$dbProcess->start();
3940

4041
$stream = $dbProcess->getStdout();
@@ -43,7 +44,10 @@ public static function setUpBeforeClass()
4344
while ($chunk = yield $stream->read()) {
4445
$output .= $chunk;
4546

46-
if (strstr($output, 'Ready to accept connections')) {
47+
if (
48+
stristr($output, 'Ready to accept connections')
49+
|| time() - $startTime > 3
50+
) {
4751
break;
4852
}
4953
}

0 commit comments

Comments
 (0)