Skip to content

Commit

Permalink
fix(tests): fix for coverage tests - higher waiting values needed in …
Browse files Browse the repository at this point in the history
…some specific cases
  • Loading branch information
Rastusik committed Feb 6, 2023
1 parent da9faad commit b10bd60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Feature/SwooleServerCoroutinesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public function testCoroutinesAndTaskWorkersWithEnvs(array $envs): void

$end = microtime(true);
// after one second, three rows should be in the file, not after 1.6s
self::assertLessThan(self::coverageEnabled() ? 2.2 : 1.1, $end - $start);
self::assertLessThan(self::coverageEnabled() ? 3 : 1.1, $end - $start);
});

$content = file_get_contents($fileName);
Expand Down Expand Up @@ -340,7 +340,7 @@ public function testCoroutinesWithTaskWorkersWithDoctrine(array $envs): void
$wg->wait(3);
$end = microtime(true);

self::assertLessThan(1.5, $end - $start);
self::assertLessThan(self::coverageEnabled() ? 2 : 1.5, $end - $start);
usleep(1200000);
});

Expand Down

0 comments on commit b10bd60

Please sign in to comment.