Skip to content

Commit

Permalink
wait for the server to be ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Mar 10, 2024
1 parent 6618392 commit af2863f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,16 @@ public function tearDown(): void

public function testAsyncHttpServer()
{
// let the server time to boot
\usleep(500_000);
$started = $this
->server
->output()
->chunks()
->find(static fn($pair) => $pair[0]->startsWith('HTTP server ready!'));

$this->assertTrue($started->match(
static fn() => true,
static fn() => false,
));

$error = $this
->os
Expand Down

0 comments on commit af2863f

Please sign in to comment.