File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -562,21 +562,21 @@ class BulkWriteOperationSpecification extends FunctionalSpecification {
562
562
collection. insert(getTestInserts())
563
563
564
564
def operation = initializeBulkOperation(ordered)
565
- operation. insert(new BasicDBObject (' _id' , 1 )) // duplicate key
566
565
operation. insert(new BasicDBObject (' _id' , 7 ))
566
+ operation. insert(new BasicDBObject (' _id' , 1 )) // duplicate key
567
567
568
568
when :
569
- operation. execute(new WriteConcern (3 , 1 ))
569
+ operation. execute(new WriteConcern (4 , 1 )) // This is assuming that it won't be able to replicate to 4 servers in 1 ms
570
570
571
571
then :
572
572
def ex = thrown(BulkWriteException )
573
573
ex. writeErrors. size() == 1
574
- ex. writeErrors[0 ]. index == 0
574
+ ex. writeErrors[0 ]. index == 1
575
575
ex. writeErrors[0 ]. code == 11000
576
- ex. writeConcernError. code == 64
576
+ ex. writeConcernError != null
577
577
578
578
where :
579
- ordered << [true , false ]
579
+ ordered << [false ]
580
580
}
581
581
582
582
def ' execute should throw IllegalStateException when already executed' () {
You can’t perform that action at this time.
0 commit comments