Skip to content

Commit

Permalink
chore: fix flaky '[node/http] send request with non-chunked body' test (
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed May 15, 2024
1 parent 36d877b commit e661591
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/unit_node/http_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,12 @@ Deno.test("[node/http] send request with non-chunked body", async () => {
req.write("world");
req.end();

await servePromise;
await Promise.all([
servePromise,
// wait 100ms because of the socket.setTimeout(100) above
// in order to not cause a flaky test sanitizer failure
await new Promise((resolve) => setTimeout(resolve, 100)),
]);
});

Deno.test("[node/http] send request with chunked body", async () => {
Expand Down

0 comments on commit e661591

Please sign in to comment.