From f32d070c12e269ff97e739865748225f39480c00 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Fri, 18 Oct 2024 16:18:15 +0530 Subject: [PATCH] enable websocket tests --- ext/node/ops/http.rs | 4 ++-- tests/unit_node/http_test.ts | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ext/node/ops/http.rs b/ext/node/ops/http.rs index 1524af1a98..e41e517109 100644 --- a/ext/node/ops/http.rs +++ b/ext/node/ops/http.rs @@ -114,7 +114,7 @@ where let (sender, conn) = hyper::client::conn::http1::handshake(io).await?; ( tokio::task::spawn(async move { - conn.await?; + conn.with_upgrades().await?; Ok::<_, AnyError>(()) }), sender, @@ -135,7 +135,7 @@ where // Spawn a task to poll the connection, driving the HTTP state ( tokio::task::spawn(async move { - conn.await?; + conn.with_upgrades().await?; Ok::<_, AnyError>(()) }), sender, diff --git a/tests/unit_node/http_test.ts b/tests/unit_node/http_test.ts index 4990210997..5736aad271 100644 --- a/tests/unit_node/http_test.ts +++ b/tests/unit_node/http_test.ts @@ -852,7 +852,7 @@ Deno.test("[node/http] HTTPS server", async () => { Deno.test( "[node/http] client upgrade", - { permissions: { net: true }, ignore: true }, + { permissions: { net: true } }, async () => { const { promise: serverClosed, resolve: resolveServer } = Promise .withResolvers(); @@ -1648,9 +1648,7 @@ Deno.test("[node/http] In ClientRequest, option.hostname has precedence over opt await responseReceived.promise; }); -const IGNORED_Y = - "[node/http] upgraded socket closes when the server closed without closing handshake"; -Deno.test(IGNORED_Y, { ignore: true }, async () => { +Deno.test("[node/http] upgraded socket closes when the server closed without closing handshake", async () => { const clientSocketClosed = Promise.withResolvers(); const serverProcessClosed = Promise.withResolvers();