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 = {
12091209 }
12101210 } as OptionDescriptor ,
12111211 wtimeoutMS : {
1212+ deprecated : 'Please use timeoutMS instead' ,
12121213 target : 'writeConcern' ,
12131214 transform ( { values : [ value ] , options } ) {
12141215 const wc = WriteConcern . fromOptions ( {
Original file line number Diff line number Diff line change @@ -569,6 +569,14 @@ export function resolveOptions<T extends CommandOperationOptions>(
569569 }
570570
571571 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+ }
572580
573581 return result ;
574582}
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { runUnifiedSuite } from '../../tools/unified-spec-runner/runner';
77const skippedSpecs = {
88 'change-streams' : 'TODO(NODE-6035)' ,
99 'convenient-transactions' : 'TODO(NODE-5687)' ,
10- 'deprecated-options' : 'TODO(NODE-5689)' ,
1110 'tailable-awaitData' : 'TODO(NODE-6035)' ,
1211 'tailable-non-awaitData' : 'TODO(NODE-6035)'
1312} ;
You can’t perform that action at this time.
0 commit comments