1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-30 16:40:57 -05:00

use random port in a case in http_test

This commit is contained in:
Yoshiya Hinosawa 2024-11-18 17:59:21 +09:00
parent e2dc215e11
commit 18cbca8d88
No known key found for this signature in database
GPG key ID: 9017DB4559488785

View file

@ -689,6 +689,7 @@ Deno.test("[node/http] ClientRequest handle non-string headers", async () => {
method: "POST",
headers: { 1: 2 },
}, (resp) => {
console.log("resp", resp);
headers = resp.headers;
resp.on("data", () => {});
@ -1050,7 +1051,7 @@ Deno.test(
let receivedRequest = false;
const requestClosed = Promise.withResolvers<void>();
const ac = new AbortController();
const server = Deno.serve({ signal: ac.signal }, () => {
const server = Deno.serve({ port: 0, signal: ac.signal }, () => {
receivedRequest = true;
return new Response(null);
});