@@ -59,7 +59,7 @@ Using a 5.0+ server, create a collection with
59
59
}
60
60
```
61
61
62
- Enable [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) to observe
62
+ Enable [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) to observe
63
63
CommandSucceededEvents. Then, insert an invalid document (e.g. ` {x: 1} ` ) and assert that a WriteError occurs, that its
64
64
code is ` 121 ` (i.e. DocumentValidationFailure), and that its ` details ` property is accessible. Additionally, assert that
65
65
a CommandSucceededEvent was observed and that the ` writeErrors[0].errInfo ` field in the response document matches the
@@ -73,7 +73,7 @@ Test that `MongoClient.bulkWrite` properly handles `writeModels` inputs containi
73
73
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.
74
74
75
75
Construct a ` MongoClient ` (referred to as ` client ` ) with
76
- [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) enabled to observe
76
+ [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) enabled to observe
77
77
CommandStartedEvents. Perform a ` hello ` command using ` client ` and record the ` maxWriteBatchSize ` value contained in the
78
78
response. Then, construct the following write model (referred to as ` model ` ):
79
79
@@ -101,7 +101,7 @@ Test that `MongoClient.bulkWrite` properly handles a `writeModels` input which c
101
101
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.
102
102
103
103
Construct a ` MongoClient ` (referred to as ` client ` ) with
104
- [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) enabled to observe
104
+ [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) enabled to observe
105
105
CommandStartedEvents. Perform a ` hello ` command using ` client ` and record the following values from the response:
106
106
` maxBsonObjectSize ` and ` maxMessageSizeBytes ` . Then, construct the following document (referred to as ` document ` ):
107
107
@@ -140,7 +140,7 @@ Test that `MongoClient.bulkWrite` properly collects and reports `writeConcernErr
140
140
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.
141
141
142
142
Construct a ` MongoClient ` (referred to as ` client ` ) with ` retryWrites: false ` configured and
143
- [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) enabled to observe
143
+ [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) enabled to observe
144
144
CommandStartedEvents. Perform a ` hello ` command using ` client ` and record the ` maxWriteBatchSize ` value contained in the
145
145
response. Then, configure the following fail point with ` client ` :
146
146
@@ -185,7 +185,7 @@ Test that `MongoClient.bulkWrite` handles individual write errors across batches
185
185
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.
186
186
187
187
Construct a ` MongoClient ` (referred to as ` client ` ) with
188
- [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) enabled to observe
188
+ [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) enabled to observe
189
189
CommandStartedEvents. Perform a ` hello ` command using ` client ` and record the ` maxWriteBatchSize ` value contained in the
190
190
response.
191
191
@@ -240,7 +240,7 @@ Test that `MongoClient.bulkWrite` properly iterates the results cursor when `get
240
240
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.
241
241
242
242
Construct a ` MongoClient ` (referred to as ` client ` ) with
243
- [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) enabled to observe
243
+ [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) enabled to observe
244
244
CommandStartedEvents. Perform a ` hello ` command using ` client ` and record the ` maxBsonObjectSize ` value from the
245
245
response.
246
246
@@ -280,7 +280,7 @@ This test must only be run on 8.0+ servers. This test must be skipped on Atlas S
280
280
against standalone servers.
281
281
282
282
Construct a ` MongoClient ` (referred to as ` client ` ) with
283
- [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) enabled to observe
283
+ [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) enabled to observe
284
284
CommandStartedEvents. Perform a ` hello ` command using ` client ` and record the ` maxBsonObjectSize ` value from the
285
285
response.
286
286
@@ -322,7 +322,7 @@ Test that `MongoClient.bulkWrite` properly handles a failure that occurs when at
322
322
This test must only be run on 8.0+ servers. This test must be skipped on Atlas Serverless.
323
323
324
324
Construct a ` MongoClient ` (referred to as ` client ` ) with
325
- [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) enabled to observe
325
+ [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) enabled to observe
326
326
CommandStartedEvents. Perform a ` hello ` command using ` client ` and record the ` maxBsonObjectSize ` value from the
327
327
response. Then, configure the following fail point with ` client ` :
328
328
@@ -431,7 +431,7 @@ Repeat the following setup for each test case:
431
431
### Setup
432
432
433
433
Construct a ` MongoClient ` (referred to as ` client ` ) with
434
- [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.rst ) enabled to observe
434
+ [ command monitoring] ( ../../command-logging-and-monitoring/command-logging-and-monitoring.md ) enabled to observe
435
435
CommandStartedEvents. Perform a ` hello ` command using ` client ` and record the following values from the response:
436
436
` maxBsonObjectSize ` and ` maxMessageSizeBytes ` .
437
437
@@ -677,3 +677,19 @@ InsertOne {
677
677
678
678
Execute ` bulkWrite ` on ` client ` with ` model ` . Assert that an error (referred to as ` error ` ) is returned. Assert that
679
679
` error ` is a client error containing the message: "bulkWrite does not currently support automatic encryption".
680
+
681
+ ### 14. ` explain ` helpers allow users to specify ` maxTimeMS `
682
+
683
+ Drivers that provide multiple APIs to specify explain should ensure this test is run at least once with each distinct
684
+ API. For example, the Node driver runs this test with option API (` collection.find({}, { explain: ... }) ` ) and the
685
+ fluent API (` collection.find({}).explain(...) ` ).
686
+
687
+ Create a MongoClient with command monitoring enabled (referred to as ` client ` ).
688
+
689
+ Create a collection, referred to as ` collection ` , with the namespace ` explain-test.collection ` .
690
+
691
+ Run an explained find on ` collection ` . The find will have the query predicate ` { name: 'john doe' } ` . Specify a
692
+ maxTimeMS value of 2000ms for the ` explain ` .
693
+
694
+ Obtain the command started event for the explain. Confirm that the top-level explain command should has a ` maxTimeMS `
695
+ value of ` 2000 ` .
0 commit comments