Skip to content

Commit bd89644

Browse files
committed
Bring back conditional test skipping
1 parent a2ea107 commit bd89644

File tree

5 files changed

+14
-63
lines changed

5 files changed

+14
-63
lines changed

.evergreen/install-node-source.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ pushd "${NODE_JS_SOURCE_PATH}"
5555
# patch directory
5656
patch -p1 < "${ROOT_DIR}/scripts/nodejs-patches/001-configure-bz2.patch"
5757

58-
if [[ "$NODE_JS_VERSION" == "22"* ]]; then
59-
patch -p1 < "${ROOT_DIR}/scripts/nodejs22-patches/005-win-almost-fix-race-detecting-esrch-in-uv-kill.patch"
60-
fi
61-
6258
./configure --prefix "${NODE_JS_INSTALL_DIR}"
6359

6460
ncpu=$(expr $(nproc 2> /dev/null || echo 5) - 1)

packages/e2e-tests/test/e2e-auth.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
skipIfApiStrict,
88
startSharedTestServer,
99
} from '../../../testing/integration-testing-hooks';
10+
import { skipDueToEPermErrors } from './util-helpers';
1011

1112
type AssertUserExists = (opts?: Document, username?: string) => Promise<void>;
1213
function createAssertUserExists(db: Db, dbName: string): AssertUserExists {
@@ -1053,6 +1054,8 @@ describe('Auth e2e', function () {
10531054
shell.assertNoErrors();
10541055
});
10551056
it('cannot auth when authenticationMechanism mismatches (sha256 -> sha1)', async function () {
1057+
skipDueToEPermErrors(this);
1058+
10561059
const connectionString = await testServer.connectionString();
10571060
shell = this.startTestShell({
10581061
args: [
@@ -1074,6 +1077,8 @@ describe('Auth e2e', function () {
10741077
});
10751078
});
10761079
it('cannot auth when authenticationMechanism mismatches (sha1 -> sha256)', async function () {
1080+
skipDueToEPermErrors(this);
1081+
10771082
const connectionString = await testServer.connectionString();
10781083
shell = this.startTestShell({
10791084
args: [

packages/e2e-tests/test/e2e.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { createServer as createHTTPServer } from 'http';
2121
import { once } from 'events';
2222
import type { AddressInfo } from 'net';
2323
const { EJSON } = bson;
24-
import { sleep } from './util-helpers';
24+
import { skipDueToEPermErrors, sleep } from './util-helpers';
2525

2626
const jsContextFlagCombinations: `--jsContext=${'plain-vm' | 'repl'}`[][] = [
2727
[],
@@ -1059,6 +1059,7 @@ describe('e2e', function () {
10591059
});
10601060

10611061
it('reads and runs the vscode extension example playground', async function () {
1062+
skipDueToEPermErrors(this);
10621063
createReadStream(
10631064
path.resolve(__dirname, 'fixtures', 'exampleplayground.js')
10641065
).pipe(shell.process.stdin);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
export function sleep(ms: number): Promise<void> {
22
return new Promise((resolve) => setTimeout(resolve, ms));
33
}
4+
5+
export function skipDueToEPermErrors(context: Mocha.Context): void {
6+
if (process.platform === 'win32' && process.versions.node.startsWith('22')) {
7+
// This test fails on Windows with node 22 likely due to https://github.com/nodejs/node/issues/51766
8+
return context.skip();
9+
}
10+
}

scripts/nodejs22-patches/005-win-almost-fix-race-detecting-esrch-in-uv-kill.patch

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)