mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
tests: deflake a bunch of net related tests (#13685)
This commit is contained in:
parent
8891c19c57
commit
be9c2fe267
6 changed files with 33 additions and 26 deletions
|
@ -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",
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue