From 93377baf9c201d6bea8717e96bf6dcf4f986f88c Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Wed, 6 Mar 2024 18:48:08 +0530 Subject: [PATCH] make the test less flaky --- tests/unit_node/http2_test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit_node/http2_test.ts b/tests/unit_node/http2_test.ts index bc7ababef93a01..8e7a525da9455c 100644 --- a/tests/unit_node/http2_test.ts +++ b/tests/unit_node/http2_test.ts @@ -156,4 +156,7 @@ Deno.test("[node/http2.createServer()]", async () => { ]); assertEquals(response, "Hello, World!"); server.close(); + // Wait to avoid leaking the timer from here + // https://github.com/denoland/deno/blob/749b6e45e58ac87188027f79fe403d130f86bd73/ext/node/polyfills/net.ts#L2396-L2402 + await new Promise((resolve) => server.on("close", resolve)); });