@@ -168,8 +168,8 @@ InsertOne: {
168
168
```
169
169
170
170
Construct a list of write models (referred to as ` models ` ) with ` model ` repeated ` maxWriteBatchSize + 1 ` times. Execute
171
- ` bulkWrite ` on ` client ` with ` models ` . Assert that the bulk write fails and returns a ` BulkWriteError ` (referred to as
172
- ` error ` ).
171
+ ` bulkWrite ` on ` client ` with ` models ` . Assert that the bulk write fails and returns a ` BulkWriteException ` (referred to
172
+ as ` error ` ).
173
173
174
174
Assert that ` error.writeConcernErrors ` has a length of 2.
175
175
@@ -216,7 +216,7 @@ Construct a list of write models (referred to as `models`) with `model` repeated
216
216
Test that an unordered bulk write collects ` WriteError ` s across batches.
217
217
218
218
Execute ` bulkWrite ` on ` client ` with ` models ` and ` ordered ` set to false. Assert that the bulk write fails and returns a
219
- ` BulkWriteError ` (referred to as ` unorderedError ` ).
219
+ ` BulkWriteException ` (referred to as ` unorderedError ` ).
220
220
221
221
Assert that ` unorderedError.writeErrors ` has a length of ` maxWriteBatchSize + 1 ` .
222
222
@@ -227,7 +227,7 @@ Assert that two CommandStartedEvents were observed for the `bulkWrite` command.
227
227
Test that an ordered bulk write does not execute further batches when a ` WriteError ` occurs.
228
228
229
229
Execute ` bulkWrite ` on ` client ` with ` models ` and ` ordered ` set to true. Assert that the bulk write fails and returns a
230
- ` BulkWriteError ` (referred to as ` orderedError ` ).
230
+ ` BulkWriteException ` (referred to as ` orderedError ` ).
231
231
232
232
Assert that ` orderedError.writeErrors ` has a length of 1.
233
233
@@ -356,7 +356,7 @@ UpdateOne {
356
356
```
357
357
358
358
Execute ` bulkWrite ` on ` client ` with ` models ` and ` verboseResults ` set to true. Assert that the bulk write fails and
359
- returns a ` BulkWriteError ` (referred to as ` bulkWriteError ` ).
359
+ returns a ` BulkWriteException ` (referred to as ` bulkWriteError ` ).
360
360
361
361
Assert that ` bulkWriteError.error ` is populated with an error (referred to as ` topLevelError ` ). Assert that
362
362
` topLevelError.errorCode ` is equal to 8.
@@ -583,7 +583,8 @@ InsertOne {
583
583
```
584
584
585
585
Execute ` bulkWrite ` on ` client ` with ` largeDocumentModel ` . Assert that an error (referred to as ` error ` ) is returned.
586
- Assert that ` error ` is a client error.
586
+ Assert that ` error ` is a client error. If a ` BulkWriteException ` was thrown, assert ` BulkWriteException.partialResult `
587
+ is unset.
587
588
588
589
#### Case 2: ` namespace ` too large
589
590
@@ -603,7 +604,8 @@ InsertOne {
603
604
```
604
605
605
606
Execute ` bulkWrite ` on ` client ` with ` largeNamespaceModel ` . Assert that an error (referred to as ` error ` ) is returned.
606
- Assert that ` error ` is a client error.
607
+ Assert that ` error ` is a client error. If a ` BulkWriteException ` was thrown, assert ` BulkWriteException.partialResult `
608
+ is unset.
607
609
608
610
### 13. ` MongoClient.bulkWrite ` returns an error if auto-encryption is configured
609
611
@@ -637,7 +639,8 @@ InsertOne {
637
639
```
638
640
639
641
Execute ` bulkWrite ` on ` client ` with ` model ` . Assert that an error (referred to as ` error ` ) is returned. Assert that
640
- ` error ` is a client error containing the message: "bulkWrite does not currently support automatic encryption".
642
+ ` error ` is a client error containing the message: "bulkWrite does not currently support automatic encryption". If a
643
+ ` BulkWriteException ` was thrown, assert ` BulkWriteException.partialResult ` is unset.
641
644
642
645
### 14. ` explain ` helpers allow users to specify ` maxTimeMS `
643
646
0 commit comments