File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
test/integration/client-side-operations-timeout Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1209,6 +1209,7 @@ export const OPTIONS = {
1209
1209
}
1210
1210
} as OptionDescriptor ,
1211
1211
wtimeoutMS : {
1212
+ deprecated : 'Please use timeoutMS instead' ,
1212
1213
target : 'writeConcern' ,
1213
1214
transform ( { values : [ value ] , options } ) {
1214
1215
const wc = WriteConcern . fromOptions ( {
Original file line number Diff line number Diff line change @@ -569,6 +569,14 @@ export function resolveOptions<T extends CommandOperationOptions>(
569
569
}
570
570
571
571
result . timeoutMS = options ?. timeoutMS ?? parent ?. timeoutMS ;
572
+ if ( result . timeoutMS != null && result . writeConcern ) {
573
+ const matchOptions = new Set ( [ 'wtimeout' , 'wtimeoutMS' ] ) ;
574
+ console . log ( result . writeConcern ) ;
575
+ const writeConcernKeys = Object . keys ( result . writeConcern ) ;
576
+ if ( writeConcernKeys . length <= 2 && writeConcernKeys . every ( k => matchOptions . has ( k ) ) ) {
577
+ delete result . writeConcern ;
578
+ }
579
+ }
572
580
573
581
return result ;
574
582
}
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';
7
7
const skippedSpecs = {
8
8
'change-streams' : 'TODO(NODE-6035)' ,
9
9
'convenient-transactions' : 'TODO(NODE-5687)' ,
10
- 'deprecated-options' : 'TODO(NODE-5689)' ,
11
10
'tailable-awaitData' : 'TODO(NODE-6035)' ,
12
11
'tailable-non-awaitData' : 'TODO(NODE-6035)'
13
12
} ;
You can’t perform that action at this time.
0 commit comments