tests: deflake a bunch of net related tests (#13685)

This commit is contained in:
Luca Casonato 2022-02-16 16:51:32 +01:00 committed by GitHub
parent 8891c19c57
commit be9c2fe267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 26 deletions

View file

@ -926,11 +926,11 @@ Deno.test(
let httpConn: Deno.HttpConn;
const promise = (async () => {
listener = Deno.listen({ port: 4502 });
listener = Deno.listen({ port: 4508 });
for await (const conn of listener) {
httpConn = Deno.serveHttp(conn);
for await (const { request, respondWith } of httpConn) {
assertEquals(new URL(request.url).href, "http://127.0.0.1:4502/");
assertEquals(new URL(request.url).href, "http://127.0.0.1:4508/");
// not reading request body on purpose
respondWith(new Response("ok"));
}
@ -938,7 +938,7 @@ Deno.test(
})();
const resourcesBefore = Deno.resources();
const response = await fetch("http://127.0.0.1:4502", {
const response = await fetch("http://127.0.0.1:4508", {
method: "POST",
body: "hello world",
});