Skip to content

Commit 5984422

Browse files
authored
DRIVERS-2847 Update CSOT encryption test for listCollections (#1564)
DRIVERS-2847
1 parent 4c5f77b commit 5984422

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

source/client-side-encryption/etc/test-templates/timeoutMS.yml.template

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,22 @@ tests:
3838
command_name: listCollections
3939

4040
# Test that timeoutMS applies to the sum of all operations done for client-side encryption. This is done by blocking
41-
# listCollections and find for 20ms each and running an insertOne with timeoutMS=50. There should be two
42-
# listCollections commands and one "find" command, so the sum should take more than timeoutMS.
41+
# listCollections and find for 30ms each and running an insertOne with timeoutMS=50. There should be one
42+
# listCollections command and one "find" command, so the sum should take more than timeoutMS. A second listCollections
43+
# event doesn't occur due to the internal MongoClient lacking configured auto encryption, plus libmongocrypt holds the
44+
# collection schema in cache for a minute.
4345
#
4446
# This test does not include command monitoring expectations because the exact command sequence is dependent on the
4547
# amount of time taken by mongocryptd communication. In slow runs, mongocryptd communication can breach the timeout
4648
# and result in the final "find" not being sent.
4749
- description: "remaining timeoutMS applied to find to get keyvault data"
4850
failPoint:
4951
configureFailPoint: failCommand
50-
mode: { times: 3 }
52+
mode: { times: 2 }
5153
data:
5254
failCommands: ["listCollections", "find"]
5355
blockConnection: true
54-
blockTimeMS: 20
56+
blockTimeMS: 30
5557
clientOptions:
5658
autoEncryptOpts:
5759
kmsProviders:

source/client-side-encryption/tests/legacy/timeoutMS.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/client-side-encryption/tests/legacy/timeoutMS.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,22 @@ tests:
3838
command_name: listCollections
3939

4040
# Test that timeoutMS applies to the sum of all operations done for client-side encryption. This is done by blocking
41-
# listCollections and find for 20ms each and running an insertOne with timeoutMS=50. There should be two
42-
# listCollections commands and one "find" command, so the sum should take more than timeoutMS.
41+
# listCollections and find for 30ms each and running an insertOne with timeoutMS=50. There should be one
42+
# listCollections command and one "find" command, so the sum should take more than timeoutMS. A second listCollections
43+
# event doesn't occur due to the internal MongoClient lacking configured auto encryption, plus libmongocrypt holds the
44+
# collection schema in cache for a minute.
4345
#
4446
# This test does not include command monitoring expectations because the exact command sequence is dependent on the
4547
# amount of time taken by mongocryptd communication. In slow runs, mongocryptd communication can breach the timeout
4648
# and result in the final "find" not being sent.
4749
- description: "remaining timeoutMS applied to find to get keyvault data"
4850
failPoint:
4951
configureFailPoint: failCommand
50-
mode: { times: 3 }
52+
mode: { times: 2 }
5153
data:
5254
failCommands: ["listCollections", "find"]
5355
blockConnection: true
54-
blockTimeMS: 20
56+
blockTimeMS: 30
5557
clientOptions:
5658
autoEncryptOpts:
5759
kmsProviders:

0 commit comments

Comments
 (0)