Skip to content

Commit

Permalink
[nfc] Work around race condition in inspector-test
Browse files Browse the repository at this point in the history
  • Loading branch information
harrishancock committed Aug 21, 2024
1 parent cc0f0dd commit 9f455c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/workerd/server/tests/inspector/driver.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ beforeEach(async () => {
});

await workerd.start();

// We wait for the worker's HTTP port to come online before starting the test case. If we don't,
// and the inspector port comes online first, there's a chance the inspector connection will fail
// with 404 because the isolate doesn't exist yet.
await workerd.getListenPort('http');
});

// Stop workerd.
Expand Down

0 comments on commit 9f455c1

Please sign in to comment.