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)); });