diff --git a/source/crud/tests/README.md b/source/crud/tests/README.md index df4561536b..92365a6f05 100644 --- a/source/crud/tests/README.md +++ b/source/crud/tests/README.md @@ -168,8 +168,8 @@ InsertOne: { ``` Construct a list of write models (referred to as `models`) with `model` repeated `maxWriteBatchSize + 1` times. Execute -`bulkWrite` on `client` with `models`. Assert that the bulk write fails and returns a `BulkWriteError` (referred to as -`error`). +`bulkWrite` on `client` with `models`. Assert that the bulk write fails and returns a `BulkWriteException` (referred to +as `error`). Assert that `error.writeConcernErrors` has a length of 2. @@ -216,7 +216,7 @@ Construct a list of write models (referred to as `models`) with `model` repeated Test that an unordered bulk write collects `WriteError`s across batches. Execute `bulkWrite` on `client` with `models` and `ordered` set to false. Assert that the bulk write fails and returns a -`BulkWriteError` (referred to as `unorderedError`). +`BulkWriteException` (referred to as `unorderedError`). Assert that `unorderedError.writeErrors` has a length of `maxWriteBatchSize + 1`. @@ -227,7 +227,7 @@ Assert that two CommandStartedEvents were observed for the `bulkWrite` command. Test that an ordered bulk write does not execute further batches when a `WriteError` occurs. Execute `bulkWrite` on `client` with `models` and `ordered` set to true. Assert that the bulk write fails and returns a -`BulkWriteError` (referred to as `orderedError`). +`BulkWriteException` (referred to as `orderedError`). Assert that `orderedError.writeErrors` has a length of 1. @@ -356,7 +356,7 @@ UpdateOne { ``` Execute `bulkWrite` on `client` with `models` and `verboseResults` set to true. Assert that the bulk write fails and -returns a `BulkWriteError` (referred to as `bulkWriteError`). +returns a `BulkWriteException` (referred to as `bulkWriteError`). Assert that `bulkWriteError.error` is populated with an error (referred to as `topLevelError`). Assert that `topLevelError.errorCode` is equal to 8. @@ -583,7 +583,8 @@ InsertOne { ``` Execute `bulkWrite` on `client` with `largeDocumentModel`. Assert that an error (referred to as `error`) is returned. -Assert that `error` is a client error. +Assert that `error` is a client error. If a `BulkWriteException` was thrown, assert `BulkWriteException.partialResult` +is unset. #### Case 2: `namespace` too large @@ -603,7 +604,8 @@ InsertOne { ``` Execute `bulkWrite` on `client` with `largeNamespaceModel`. Assert that an error (referred to as `error`) is returned. -Assert that `error` is a client error. +Assert that `error` is a client error. If a `BulkWriteException` was thrown, assert `BulkWriteException.partialResult` +is unset. ### 13. `MongoClient.bulkWrite` returns an error if auto-encryption is configured @@ -637,7 +639,8 @@ InsertOne { ``` Execute `bulkWrite` on `client` with `model`. Assert that an error (referred to as `error`) is returned. Assert that -`error` is a client error containing the message: "bulkWrite does not currently support automatic encryption". +`error` is a client error containing the message: "bulkWrite does not currently support automatic encryption". If a +`BulkWriteException` was thrown, assert `BulkWriteException.partialResult` is unset. ### 14. `explain` helpers allow users to specify `maxTimeMS`