Skip to content

Commit a5271e5

Browse files
authored
Fix test failure with Node 18.20.3 (#7898)
Our CI installs the latest version associated with a given Node version, so it started to fail when this started loading v18.20.3 which reverted the change backported to v18.19.
1 parent 268687d commit a5271e5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.changeset/four-dogs-brake.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/server/src/__tests__/plugin/drainHttpServer/stoppable.test.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,13 @@ Object.keys(schemes).forEach((schemeName) => {
141141
// idle connections in these versions. However, `Stopper` _is_ still
142142
// useful for gracefully finishing in-flight requests within the timeout
143143
// (and aborting requests beyond the timeout).
144-
// Update: Node 18.19+ had this change backported, so the comment from above
145-
// applies to Node 18.19+ as well.
146-
const isNode18 = !!process.version.match(/^v18\./);
144+
//
145+
// (Node 18.19.0 had this change backported but it was removed again in
146+
// 18.20.3; our tests only pin major versions so we can assume 18 means
147+
// >= 18.20.3.) Update: Node 18.19+ had this change backported, so the
148+
// comment from above applies to Node 18.19+ as well.
147149
const isNode20 = !!process.version.match(/^v20\./);
148-
expect(closed).toBe(isNode18 || isNode20 ? 1 : 0);
150+
expect(closed).toBe(isNode20 ? 1 : 0);
149151
});
150152

151153
// This test specifically added for Node 20 fails for Node 14. Just going

0 commit comments

Comments
 (0)