Skip to content

Commit ca577b2

Browse files
committed
rework test skip logic
1 parent 5e8db6d commit ca577b2

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

test/integration/client-side-operations-timeout/client_side_operations_timeout.spec.test.ts

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,48 @@ const enabled = [
1010
'retryability-legacy-timeouts',
1111
'retryability-timeoutMS',
1212
'runCursorCommand',
13-
'close-cursors'
13+
'close-cursors',
14+
'non-tailable-cursors',
15+
'global-timeoutMS',
16+
'legacy-timeouts',
17+
'command-execution',
18+
'cursors',
19+
'error-transformations'
1420
];
1521

16-
const bulkWriteOperations = [
17-
'timeoutMS applies to whole operation, not individual attempts - bulkWrite on collection',
18-
'timeoutMS applies to whole operation, not individual attempts - insertMany on collection'
19-
];
22+
const skipped = {
23+
bulkWrite: 'TODO(NODE-6274)',
24+
'change-streams': 'TODO(NODE-6035)',
25+
'convenient-transactions': 'TODO(NODE-5687)',
26+
//'deprecated-options': 'TODO(NODE-5689)',
27+
'gridfs-advanced': 'TODO(NODE-6275)',
28+
'gridfs-delete': 'TODO(NODE-6275)',
29+
'gridfs-download': 'TODO(NODE-6275)',
30+
'gridfs-find': 'TODO(NODE-6275)',
31+
'gridfs-upload': 'TODO(NODE-6275)',
32+
'sessions-inherit-timeoutMS': 'TODO(NODE-5687)',
33+
'sessions-override-operation-timeoutMS': 'TODO(NODE-5687)',
34+
'sessions-override-timeoutMS': 'TODO(NODE-5687)',
35+
'tailable-awaitData': 'TODO(NODE-6035)',
36+
'tailable-non-awaitData': 'TODO(NODE-6035)'
37+
};
38+
39+
const bulkWriteOperations =
40+
/timeoutMS applies to whole operation, not individual attempts - (bulkWrite|insertMany) on .*/;
2041

2142
describe('CSOT spec tests', function () {
2243
const specs = loadSpecTests(join('client-side-operations-timeout'));
2344
for (const spec of specs) {
2445
for (const test of spec.tests) {
25-
// not one of the test suites listed in kickoff
26-
if (!enabled.includes(spec.name)) {
27-
test.skipReason = 'TODO(NODE-5684): Not working yet';
46+
if (skipped[spec.name] != null) {
47+
test.skipReason = skipped[spec.name];
2848
}
2949

30-
if (bulkWriteOperations.includes(test.description))
50+
if (bulkWriteOperations.test(test.description))
3151
test.skipReason =
3252
'TODO(NODE-6274): update test runner to check errorResponse field of MongoBulkWriteError in isTimeoutError assertion';
3353
}
3454
}
55+
3556
runUnifiedSuite(specs);
3657
});

0 commit comments

Comments
 (0)