@@ -172,7 +172,7 @@ class CommandMessageSpecification extends Specification {
172
172
new BsonDocument (' insert' , new BsonString (' coll' )),
173
173
new SplittablePayload (INSERT , [new BsonDocument (' _id' , new BsonInt32 (1 )),
174
174
new BsonDocument (' _id' , new BsonInt32 (2 ))]
175
- .withIndex(). collect { doc , i -> new WriteRequestWithIndex (new InsertRequest (doc), i) } ),
175
+ .withIndex(). collect { doc , i -> new WriteRequestWithIndex (new InsertRequest (doc), i) }, true ),
176
176
],
177
177
[
178
178
LATEST_WIRE_VERSION ,
@@ -193,7 +193,7 @@ class CommandMessageSpecification extends Specification {
193
193
new BsonDocument (' _id' , new BsonInt32 (3 )). append(' c' , new BsonBinary (new byte [450 ])),
194
194
new BsonDocument (' _id' , new BsonInt32 (4 )). append(' b' , new BsonBinary (new byte [441 ])),
195
195
new BsonDocument (' _id' , new BsonInt32 (5 )). append(' c' , new BsonBinary (new byte [451 ]))]
196
- .withIndex(). collect { doc , i -> new WriteRequestWithIndex (new InsertRequest (doc), i) } )
196
+ .withIndex(). collect { doc , i -> new WriteRequestWithIndex (new InsertRequest (doc), i) }, true )
197
197
def message = new CommandMessage (namespace, insertCommand, fieldNameValidator, ReadPreference . primary(), messageSettings,
198
198
false , payload, fieldNameValidator, ClusterConnectionMode . MULTIPLE , null )
199
199
def output = new BasicOutputBuffer ()
@@ -280,7 +280,7 @@ class CommandMessageSpecification extends Specification {
280
280
def payload = new SplittablePayload (INSERT , [new BsonDocument (' a' , new BsonBinary (new byte [900 ])),
281
281
new BsonDocument (' b' , new BsonBinary (new byte [450 ])),
282
282
new BsonDocument (' c' , new BsonBinary (new byte [450 ]))]
283
- .withIndex(). collect { doc , i -> new WriteRequestWithIndex (new InsertRequest (doc), i) } )
283
+ .withIndex(). collect { doc , i -> new WriteRequestWithIndex (new InsertRequest (doc), i) }, true )
284
284
def message = new CommandMessage (namespace, command, fieldNameValidator, ReadPreference . primary(), messageSettings,
285
285
false , payload, fieldNameValidator, ClusterConnectionMode . MULTIPLE , null )
286
286
def output = new BasicOutputBuffer ()
@@ -328,7 +328,7 @@ class CommandMessageSpecification extends Specification {
328
328
def messageSettings = MessageSettings . builder(). maxDocumentSize(900 )
329
329
.maxWireVersion(LATEST_WIRE_VERSION ). build()
330
330
def payload = new SplittablePayload (INSERT , [new BsonDocument (' a' , new BsonBinary (new byte [900 ]))]
331
- .withIndex(). collect { doc , i -> new WriteRequestWithIndex (new InsertRequest (doc), i) })
331
+ .withIndex(). collect { doc , i -> new WriteRequestWithIndex (new InsertRequest (doc), i) }, true )
332
332
def message = new CommandMessage (namespace, command, fieldNameValidator, ReadPreference . primary(), messageSettings,
333
333
false , payload, fieldNameValidator, ClusterConnectionMode . MULTIPLE , null )
334
334
def output = new BasicOutputBuffer ()
@@ -348,7 +348,7 @@ class CommandMessageSpecification extends Specification {
348
348
given :
349
349
def messageSettings = MessageSettings . builder(). serverType(ServerType . SHARD_ROUTER )
350
350
.maxWireVersion(FOUR_DOT_ZERO_WIRE_VERSION ). build()
351
- def payload = new SplittablePayload (INSERT , [new BsonDocument (' a' , new BsonInt32 (1 ))])
351
+ def payload = new SplittablePayload (INSERT , [new BsonDocument (' a' , new BsonInt32 (1 ))], true )
352
352
def message = new CommandMessage (namespace, command, fieldNameValidator, ReadPreference . primary(), messageSettings,
353
353
false , payload, fieldNameValidator, ClusterConnectionMode . MULTIPLE , null )
354
354
def output = new BasicOutputBuffer ()
0 commit comments