@@ -723,32 +723,37 @@ describe('Bulk', function () {
723
723
}
724
724
} ) ;
725
725
726
- it ( 'should correctly execute ordered batch using w:0' , function ( done ) {
727
- client . connect ( ( err , client ) => {
728
- const db = client . db ( ) ;
729
- const col = db . collection ( 'batch_write_ordered_ops_9' ) ;
726
+ it (
727
+ 'should correctly execute ordered batch using w:0' ,
728
+ // TODO(NODE-6060): set `moreToCome` op_msg bit when `w: 0` is specified
729
+ { requires : { mongodb : '<8.0.0' } } ,
730
+ function ( done ) {
731
+ client . connect ( ( err , client ) => {
732
+ const db = client . db ( ) ;
733
+ const col = db . collection ( 'batch_write_ordered_ops_9' ) ;
730
734
731
- const bulk = col . initializeOrderedBulkOp ( ) ;
732
- for ( let i = 0 ; i < 100 ; i ++ ) {
733
- bulk . insert ( { a : 1 } ) ;
734
- }
735
+ const bulk = col . initializeOrderedBulkOp ( ) ;
736
+ for ( let i = 0 ; i < 100 ; i ++ ) {
737
+ bulk . insert ( { a : 1 } ) ;
738
+ }
735
739
736
- bulk . find ( { b : 1 } ) . upsert ( ) . update ( { b : 1 } ) ;
737
- bulk . find ( { c : 1 } ) . delete ( ) ;
740
+ bulk . find ( { b : 1 } ) . upsert ( ) . update ( { b : 1 } ) ;
741
+ bulk . find ( { c : 1 } ) . delete ( ) ;
738
742
739
- bulk . execute ( { writeConcern : { w : 0 } } , function ( err , result ) {
740
- expect ( err ) . to . not . exist ;
741
- test . equal ( 0 , result . upsertedCount ) ;
742
- test . equal ( 0 , result . insertedCount ) ;
743
- test . equal ( 0 , result . matchedCount ) ;
744
- test . ok ( 0 === result . modifiedCount || result . modifiedCount == null ) ;
745
- test . equal ( 0 , result . deletedCount ) ;
746
- test . equal ( false , result . hasWriteErrors ( ) ) ;
743
+ bulk . execute ( { writeConcern : { w : 0 } } , function ( err , result ) {
744
+ expect ( err ) . to . not . exist ;
745
+ test . equal ( 0 , result . upsertedCount ) ;
746
+ test . equal ( 0 , result . insertedCount ) ;
747
+ test . equal ( 0 , result . matchedCount ) ;
748
+ test . ok ( 0 === result . modifiedCount || result . modifiedCount == null ) ;
749
+ test . equal ( 0 , result . deletedCount ) ;
750
+ test . equal ( false , result . hasWriteErrors ( ) ) ;
747
751
748
- client . close ( done ) ;
752
+ client . close ( done ) ;
753
+ } ) ;
749
754
} ) ;
750
- } ) ;
751
- } ) ;
755
+ }
756
+ ) ;
752
757
753
758
it ( 'should correctly handle single unordered batch API' , function ( done ) {
754
759
client . connect ( ( err , client ) => {
0 commit comments