mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
fix(ext/timers): fix flakiness of httpConnAutoCloseDelayedOnUpgrade
test (#13017)
This commit is contained in:
parent
9e87ac9e0e
commit
5c0636888c
1 changed files with 4 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue