Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ext/timers): fix flakiness of httpConnAutoCloseDelayedOnUpgrade test #13017

Merged
merged 14 commits into from
Dec 7, 2021
Merged
4 changes: 4 additions & 0 deletions cli/tests/unit/http_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1055,12 +1055,16 @@ Deno.test(

const { socket, response } = Deno.upgradeWebSocket(event1.request);
socket.onmessage = (event) => socket.send(event.data);
const socketClosed = new Promise<void>((resolve) => {
socket.onclose = () => resolve();
});
event1.respondWith(response);

const event2 = await event2Promise;
assertStrictEquals(event2, null);

listener.close();
await socketClosed;
}

async function client() {
Expand Down