@@ -3,7 +3,7 @@ import { join } from 'path';
3
3
import { loadSpecTests } from '../../spec' ;
4
4
import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner' ;
5
5
6
- const skipped = {
6
+ const skippedSpecs = {
7
7
bulkWrite : 'TODO(NODE-6274)' ,
8
8
'change-streams' : 'TODO(NODE-6035)' ,
9
9
'convenient-transactions' : 'TODO(NODE-5687)' ,
@@ -20,20 +20,31 @@ const skipped = {
20
20
'tailable-non-awaitData' : 'TODO(NODE-6035)'
21
21
} ;
22
22
23
- const bulkWriteOperations =
24
- / t i m e o u t M S a p p l i e s t o w h o l e o p e r a t i o n , n o t i n d i v i d u a l a t t e m p t s - ( b u l k W r i t e | i n s e r t M a n y ) o n .* / ;
23
+ const skippedTests = {
24
+ 'timeoutMS can be configured on a MongoClient - insertMany on collection' : 'TODO(NODE-6274)' ,
25
+ 'timeoutMS can be configured on a MongoClient - bulkWrite on collection' : 'TODO(NODE-6274)' ,
26
+ 'timeoutMS can be configured on a MongoClient - createChangeStream on client' : 'TODO(NODE-6305)' ,
27
+ 'timeoutMS applies to whole operation, not individual attempts - createChangeStream on client' :
28
+ 'TODO(NODE-6305)' ,
29
+ 'Tailable cursor iteration timeoutMS is refreshed for getMore - failure' : 'TODO(NODE-6305)' ,
30
+ 'Tailable cursor awaitData iteration timeoutMS is refreshed for getMore - failure' :
31
+ 'TODO(NODE-6305)' ,
32
+ 'timeoutMS applies to whole operation, not individual attempts - insertMany on collection' :
33
+ 'TODO(NODE-6274)' ,
34
+ 'timeoutMS applies to whole operation, not individual attempts - bulkWrite on collection' :
35
+ 'TODO(NODE-6274)'
36
+ } ;
25
37
26
38
describe ( 'CSOT spec tests' , function ( ) {
27
39
const specs = loadSpecTests ( join ( 'client-side-operations-timeout' ) ) ;
28
40
for ( const spec of specs ) {
29
41
for ( const test of spec . tests ) {
30
- if ( skipped [ spec . name ] != null ) {
31
- test . skipReason = skipped [ spec . name ] ;
42
+ if ( skippedSpecs [ spec . name ] != null ) {
43
+ test . skipReason = skippedSpecs [ spec . name ] ;
44
+ }
45
+ if ( skippedTests [ test . description ] != null ) {
46
+ test . skipReason = skippedTests [ test . description ] ;
32
47
}
33
-
34
- if ( bulkWriteOperations . test ( test . description ) )
35
- test . skipReason =
36
- 'TODO(NODE-6274): update test runner to check errorResponse field of MongoBulkWriteError in isTimeoutError assertion' ;
37
48
}
38
49
}
39
50
0 commit comments