summaryrefslogtreecommitdiff
path: root/cli/tests/unit/fetch_test.ts
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-07-31 07:29:17 -0600
committerGitHub <noreply@github.com>2023-07-31 07:29:17 -0600
commit43877f120905e9502472452d6d88ae4663cd9d94 (patch)
treeffcacb5181ca99b811d98e8854b6370d7ec08a5a /cli/tests/unit/fetch_test.ts
parent2fd87471e83567fcbda621d84fd25d4749cf8af2 (diff)
chore(cli): Reduce port conflict in tests (#19988)
Ports are still occasionally causing CI flake -- allocate and separate ports further for fetch/http tests.
Diffstat (limited to 'cli/tests/unit/fetch_test.ts')
-rw-r--r--cli/tests/unit/fetch_test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts
index 35fe48dca..204a159a7 100644
--- a/cli/tests/unit/fetch_test.ts
+++ b/cli/tests/unit/fetch_test.ts
@@ -10,7 +10,7 @@ import {
} from "./test_util.ts";
import { Buffer } from "../../../test_util/std/io/buffer.ts";
-const listenPort = 4504;
+const listenPort = 4506;
Deno.test(
{ permissions: { net: true } },
@@ -1909,7 +1909,7 @@ Deno.test(
// https://github.com/denoland/deno/issues/18350
{ ignore: Deno.build.os === "windows", permissions: { net: true } },
async function fetchRequestBodyErrorCatchable() {
- const listener = Deno.listen({ hostname: "127.0.0.1", port: 4514 });
+ const listener = Deno.listen({ hostname: "127.0.0.1", port: listenPort });
const server = (async () => {
const conn = await listener.accept();
listener.close();
@@ -1936,7 +1936,7 @@ Deno.test(
});
const err = await assertRejects(() =>
- fetch("http://localhost:4514", {
+ fetch(`http://localhost:${listenPort}/`, {
body: stream,
method: "POST",
})