Skip to content

Commit

Permalink
skip hyperdrive e2e test in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz committed Sep 7, 2024
1 parent 426c2e6 commit 45c6c59
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions packages/wrangler/e2e/get-platform-proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,29 @@ describe("getPlatformProxy()", () => {
});
});

it("can connect to a TCP socket via the hyperdrive connect method", async () => {
const socketDataMsgPromise = new Promise<string>((resolve, _) => {
server.on("connection", (sock) => {
sock.on("data", (data) => {
resolve(new TextDecoder().decode(data));
server.close();
it.skipIf(
// in c3 this test fails for windows because of ECONNRESET issues
process.platform === "win32"
)(
"can connect to a TCP socket via the hyperdrive connect method",
async () => {
const socketDataMsgPromise = new Promise<string>((resolve, _) => {
server.on("connection", (sock) => {
sock.on("data", (data) => {
resolve(new TextDecoder().decode(data));
server.close();
});
});
});
});

execSync(`node index.mjs`, {
cwd: root,
encoding: "utf-8",
});
expect(await socketDataMsgPromise).toMatchInlineSnapshot(
`"test string sent using getPlatformProxy"`
);
});
execSync(`node index.mjs`, {
cwd: root,
encoding: "utf-8",
});
expect(await socketDataMsgPromise).toMatchInlineSnapshot(
`"test string sent using getPlatformProxy"`
);
}
);
});
});

0 comments on commit 45c6c59

Please sign in to comment.