From 4286bb62c940b7c8886d4dac3e7582f4b208c9fc Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 1 Dec 2025 12:32:59 -0500 Subject: [PATCH 1/2] Skip tests on Windows that behave differently --- packages/grpc-js/test/test-client.ts | 6 ++++++ packages/grpc-js/test/test-idle-timer.ts | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/grpc-js/test/test-client.ts b/packages/grpc-js/test/test-client.ts index bbb3f063f..0ac803edc 100644 --- a/packages/grpc-js/test/test-client.ts +++ b/packages/grpc-js/test/test-client.ts @@ -124,6 +124,12 @@ describe('Client with a nonexistent target domain', () => { client.close(); }); it('should fail multiple calls', function (done) { + if (process.platform === 'win32') { + // DNS has some weird behavior on Windows + this.skip(); + // @ts-ignore: Unreachable code error + return; + } this.timeout(5000); // Regression test for https://github.com/grpc/grpc-node/issues/1411 client.makeUnaryRequest( diff --git a/packages/grpc-js/test/test-idle-timer.ts b/packages/grpc-js/test/test-idle-timer.ts index ed6af2cf7..c60704e2d 100644 --- a/packages/grpc-js/test/test-idle-timer.ts +++ b/packages/grpc-js/test/test-idle-timer.ts @@ -132,7 +132,15 @@ describe('Channel idle timer', () => { describe('Channel idle timer with UDS', () => { let server: TestServer; let client: TestClient | null = null; - before(() => { + before(function() { + if (process.platform === 'win32') { + /* The Node API that creates a UDS on Linux actually creates a named + * pipe on Windows, and those have a different naming scheme than UDS + * so the test setup doesn't work on Windows. */ + this.skip(); + // @ts-ignore: Unreachable code error + return; + } server = new TestServer(false); return server.startUds(); }); From 27296d3a5029c6e7852a19b505d1f15b22ef644f Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 1 Dec 2025 13:34:12 -0500 Subject: [PATCH 2/2] Skip UDS test 'after' hook too --- packages/grpc-js/test/test-idle-timer.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/grpc-js/test/test-idle-timer.ts b/packages/grpc-js/test/test-idle-timer.ts index c60704e2d..34381476b 100644 --- a/packages/grpc-js/test/test-idle-timer.ts +++ b/packages/grpc-js/test/test-idle-timer.ts @@ -150,7 +150,15 @@ describe('Channel idle timer with UDS', () => { client = null; } }); - after(() => { + after(function () { + if (process.platform === 'win32') { + /* The Node API that creates a UDS on Linux actually creates a named + * pipe on Windows, and those have a different naming scheme than UDS + * so the test setup doesn't work on Windows. */ + this.skip(); + // @ts-ignore: Unreachable code error + return; + } server.shutdown(); }); it('Should be able to make a request after going idle', function (done) {