diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-11-17 16:19:00 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-17 16:19:00 -0700 |
commit | 23119fc1d411de1f48c6542aed30d0876caf2aea (patch) | |
tree | a260ecd288a936fc0e139f494463af8468e19842 /cli/tests/unit/http_test.ts | |
parent | 20bf697ba6fd2aa769342c8a3b343ae265e46330 (diff) |
test(cli): http test reliability fixes (#21246)
Diffstat (limited to 'cli/tests/unit/http_test.ts')
-rw-r--r-- | cli/tests/unit/http_test.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tests/unit/http_test.ts b/cli/tests/unit/http_test.ts index 8c7bf9974..ac3b3d66f 100644 --- a/cli/tests/unit/http_test.ts +++ b/cli/tests/unit/http_test.ts @@ -1136,7 +1136,7 @@ Deno.test( { permissions: { net: true } }, async function droppedConnSenderNoPanic() { async function server() { - const listener = Deno.listen({ port: 8000 }); + const listener = Deno.listen({ port: listenPort }); const conn = await listener.accept(); const http = Deno.serveHttp(conn); const evt = await http.nextRequest(); @@ -1151,7 +1151,7 @@ Deno.test( async function client() { try { - const resp = await fetch("http://127.0.0.1:8000/"); + const resp = await fetch(`http://127.0.0.1:${listenPort}/`); await resp.body?.cancel(); } catch { // Ignore error |