@@ -168,8 +168,8 @@ InsertOne: {
168168```
169169
170170Construct 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 ` ).
173173
174174Assert that ` error.writeConcernErrors ` has a length of 2.
175175
@@ -216,7 +216,7 @@ Construct a list of write models (referred to as `models`) with `model` repeated
216216Test that an unordered bulk write collects ` WriteError ` s across batches.
217217
218218Execute ` 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 ` ).
220220
221221Assert that ` unorderedError.writeErrors ` has a length of ` maxWriteBatchSize + 1 ` .
222222
@@ -227,7 +227,7 @@ Assert that two CommandStartedEvents were observed for the `bulkWrite` command.
227227Test that an ordered bulk write does not execute further batches when a ` WriteError ` occurs.
228228
229229Execute ` 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 ` ).
231231
232232Assert that ` orderedError.writeErrors ` has a length of 1.
233233
@@ -356,7 +356,7 @@ UpdateOne {
356356```
357357
358358Execute ` 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 ` ).
360360
361361Assert that ` bulkWriteError.error ` is populated with an error (referred to as ` topLevelError ` ). Assert that
362362` topLevelError.errorCode ` is equal to 8.
@@ -583,7 +583,8 @@ InsertOne {
583583```
584584
585585Execute ` 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.
587588
588589#### Case 2: ` namespace ` too large
589590
@@ -603,7 +604,8 @@ InsertOne {
603604```
604605
605606Execute ` 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.
607609
608610### 13. ` MongoClient.bulkWrite ` returns an error if auto-encryption is configured
609611
@@ -637,7 +639,8 @@ InsertOne {
637639```
638640
639641Execute ` 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.
641644
642645### 14. ` explain ` helpers allow users to specify ` maxTimeMS `
643646
0 commit comments