mongo 2.20.1 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/Rakefile +2 -2
  4. data/lib/mongo/address.rb +22 -3
  5. data/lib/mongo/auth/aws/credentials_retriever.rb +70 -17
  6. data/lib/mongo/auth/base.rb +1 -1
  7. data/lib/mongo/bulk_write.rb +35 -2
  8. data/lib/mongo/client.rb +38 -6
  9. data/lib/mongo/client_encryption.rb +6 -3
  10. data/lib/mongo/cluster/reapers/cursor_reaper.rb +6 -1
  11. data/lib/mongo/cluster/sdam_flow.rb +20 -7
  12. data/lib/mongo/cluster.rb +14 -4
  13. data/lib/mongo/collection/helpers.rb +1 -1
  14. data/lib/mongo/collection/view/aggregation/behavior.rb +131 -0
  15. data/lib/mongo/collection/view/aggregation.rb +33 -99
  16. data/lib/mongo/collection/view/builder/aggregation.rb +1 -7
  17. data/lib/mongo/collection/view/change_stream.rb +80 -27
  18. data/lib/mongo/collection/view/iterable.rb +76 -60
  19. data/lib/mongo/collection/view/map_reduce.rb +25 -8
  20. data/lib/mongo/collection/view/readable.rb +79 -30
  21. data/lib/mongo/collection/view/writable.rb +109 -48
  22. data/lib/mongo/collection/view.rb +43 -3
  23. data/lib/mongo/collection.rb +158 -23
  24. data/lib/mongo/crypt/auto_encrypter.rb +4 -6
  25. data/lib/mongo/crypt/binding.rb +4 -4
  26. data/lib/mongo/crypt/context.rb +20 -14
  27. data/lib/mongo/crypt/encryption_io.rb +56 -26
  28. data/lib/mongo/crypt/explicit_encrypter.rb +49 -20
  29. data/lib/mongo/crypt/explicit_encryption_context.rb +17 -11
  30. data/lib/mongo/crypt/kms/azure/credentials_retriever.rb +22 -6
  31. data/lib/mongo/crypt/kms/gcp/credentials_retriever.rb +29 -4
  32. data/lib/mongo/csot_timeout_holder.rb +119 -0
  33. data/lib/mongo/cursor/kill_spec.rb +5 -2
  34. data/lib/mongo/cursor/nontailable.rb +27 -0
  35. data/lib/mongo/cursor.rb +86 -24
  36. data/lib/mongo/cursor_host.rb +82 -0
  37. data/lib/mongo/database/view.rb +81 -14
  38. data/lib/mongo/database.rb +88 -18
  39. data/lib/mongo/error/operation_failure.rb +209 -204
  40. data/lib/mongo/error/server_timeout_error.rb +12 -0
  41. data/lib/mongo/error/socket_timeout_error.rb +3 -1
  42. data/lib/mongo/error/timeout_error.rb +23 -0
  43. data/lib/mongo/error.rb +2 -0
  44. data/lib/mongo/grid/fs_bucket.rb +45 -12
  45. data/lib/mongo/grid/stream/read.rb +15 -1
  46. data/lib/mongo/grid/stream/write.rb +21 -4
  47. data/lib/mongo/index/view.rb +77 -16
  48. data/lib/mongo/operation/context.rb +40 -2
  49. data/lib/mongo/operation/create_search_indexes/op_msg.rb +2 -2
  50. data/lib/mongo/operation/delete/op_msg.rb +2 -1
  51. data/lib/mongo/operation/drop_search_index/op_msg.rb +2 -2
  52. data/lib/mongo/operation/find/op_msg.rb +45 -0
  53. data/lib/mongo/operation/get_more/op_msg.rb +33 -0
  54. data/lib/mongo/operation/insert/op_msg.rb +3 -2
  55. data/lib/mongo/operation/insert/result.rb +4 -2
  56. data/lib/mongo/operation/list_collections/result.rb +1 -1
  57. data/lib/mongo/operation/map_reduce/result.rb +1 -1
  58. data/lib/mongo/operation/op_msg_base.rb +3 -1
  59. data/lib/mongo/operation/result.rb +26 -5
  60. data/lib/mongo/operation/shared/executable.rb +12 -1
  61. data/lib/mongo/operation/shared/op_msg_executable.rb +4 -1
  62. data/lib/mongo/operation/shared/response_handling.rb +3 -3
  63. data/lib/mongo/operation/shared/sessions_supported.rb +1 -1
  64. data/lib/mongo/operation/shared/timed.rb +52 -0
  65. data/lib/mongo/operation/shared/write.rb +4 -1
  66. data/lib/mongo/operation/update/op_msg.rb +2 -1
  67. data/lib/mongo/operation/update_search_index/op_msg.rb +2 -2
  68. data/lib/mongo/operation.rb +1 -0
  69. data/lib/mongo/protocol/message.rb +1 -4
  70. data/lib/mongo/protocol/msg.rb +2 -2
  71. data/lib/mongo/retryable/read_worker.rb +69 -29
  72. data/lib/mongo/retryable/write_worker.rb +49 -18
  73. data/lib/mongo/retryable.rb +8 -2
  74. data/lib/mongo/server/connection.rb +11 -5
  75. data/lib/mongo/server/connection_base.rb +22 -2
  76. data/lib/mongo/server/connection_pool.rb +32 -14
  77. data/lib/mongo/server/description/features.rb +1 -1
  78. data/lib/mongo/server/description.rb +18 -5
  79. data/lib/mongo/server/monitor.rb +7 -4
  80. data/lib/mongo/server/pending_connection.rb +7 -3
  81. data/lib/mongo/server/{round_trip_time_averager.rb → round_trip_time_calculator.rb} +25 -7
  82. data/lib/mongo/server.rb +11 -6
  83. data/lib/mongo/server_selector/base.rb +25 -9
  84. data/lib/mongo/session.rb +78 -9
  85. data/lib/mongo/socket/ssl.rb +109 -17
  86. data/lib/mongo/socket/tcp.rb +40 -6
  87. data/lib/mongo/socket.rb +154 -25
  88. data/lib/mongo/uri/options_mapper.rb +1 -0
  89. data/lib/mongo/version.rb +1 -1
  90. data/lib/mongo.rb +1 -0
  91. data/spec/atlas/atlas_connectivity_spec.rb +4 -0
  92. data/spec/atlas/operations_spec.rb +4 -0
  93. data/spec/integration/client_side_encryption/auto_encryption_mongocryptd_spawn_spec.rb +2 -1
  94. data/spec/integration/client_side_encryption/auto_encryption_spec.rb +494 -487
  95. data/spec/integration/client_side_encryption/on_demand_aws_credentials_spec.rb +1 -1
  96. data/spec/integration/client_side_encryption/range_explicit_encryption_prose_spec.rb +66 -22
  97. data/spec/integration/client_side_operations_timeout/encryption_prose_spec.rb +131 -0
  98. data/spec/integration/connection_pool_populator_spec.rb +2 -0
  99. data/spec/integration/cursor_pinning_spec.rb +15 -60
  100. data/spec/integration/cursor_reaping_spec.rb +1 -1
  101. data/spec/integration/docs_examples_spec.rb +1 -1
  102. data/spec/integration/operation_failure_code_spec.rb +1 -1
  103. data/spec/integration/operation_failure_message_spec.rb +3 -3
  104. data/spec/integration/retryable_errors_spec.rb +2 -2
  105. data/spec/integration/sdam_error_handling_spec.rb +2 -1
  106. data/spec/integration/search_indexes_prose_spec.rb +4 -0
  107. data/spec/integration/server_spec.rb +4 -3
  108. data/spec/integration/transactions_api_examples_spec.rb +2 -0
  109. data/spec/kerberos/kerberos_spec.rb +4 -0
  110. data/spec/lite_spec_helper.rb +3 -1
  111. data/spec/mongo/auth/user/view_spec.rb +1 -1
  112. data/spec/mongo/caching_cursor_spec.rb +1 -1
  113. data/spec/mongo/client_encryption_spec.rb +1 -0
  114. data/spec/mongo/client_spec.rb +158 -4
  115. data/spec/mongo/collection/view/aggregation_spec.rb +14 -39
  116. data/spec/mongo/collection/view/change_stream_spec.rb +3 -3
  117. data/spec/mongo/collection_spec.rb +5 -6
  118. data/spec/mongo/crypt/auto_encrypter_spec.rb +14 -12
  119. data/spec/mongo/crypt/data_key_context_spec.rb +3 -1
  120. data/spec/mongo/crypt/explicit_encryption_context_spec.rb +2 -2
  121. data/spec/mongo/crypt/handle_spec.rb +1 -1
  122. data/spec/mongo/cursor_spec.rb +26 -9
  123. data/spec/mongo/error/operation_failure_heavy_spec.rb +2 -2
  124. data/spec/mongo/operation/context_spec.rb +79 -0
  125. data/spec/mongo/operation/create/op_msg_spec.rb +106 -110
  126. data/spec/mongo/operation/delete/op_msg_spec.rb +6 -5
  127. data/spec/mongo/operation/find/op_msg_spec.rb +66 -0
  128. data/spec/mongo/operation/get_more/op_msg_spec.rb +65 -0
  129. data/spec/mongo/operation/insert/op_msg_spec.rb +128 -131
  130. data/spec/mongo/operation/shared/csot/examples.rb +113 -0
  131. data/spec/mongo/query_cache_spec.rb +243 -225
  132. data/spec/mongo/retryable_spec.rb +1 -0
  133. data/spec/mongo/server/round_trip_time_calculator_spec.rb +120 -0
  134. data/spec/mongo/socket/ssl_spec.rb +0 -10
  135. data/spec/runners/change_streams/test.rb +2 -2
  136. data/spec/runners/crud/operation.rb +1 -1
  137. data/spec/runners/crud/verifier.rb +3 -1
  138. data/spec/runners/transactions/operation.rb +4 -6
  139. data/spec/runners/unified/ambiguous_operations.rb +13 -0
  140. data/spec/runners/unified/assertions.rb +4 -0
  141. data/spec/runners/unified/change_stream_operations.rb +14 -24
  142. data/spec/runners/unified/crud_operations.rb +82 -59
  143. data/spec/runners/unified/ddl_operations.rb +38 -7
  144. data/spec/runners/unified/grid_fs_operations.rb +37 -2
  145. data/spec/runners/unified/support_operations.rb +43 -4
  146. data/spec/runners/unified/test.rb +22 -10
  147. data/spec/runners/unified.rb +1 -1
  148. data/spec/solo/clean_exit_spec.rb +2 -0
  149. data/spec/spec_tests/client_side_operations_timeout_spec.rb +15 -0
  150. data/spec/spec_tests/data/change_streams_unified/change-streams-clusterTime.yml +3 -1
  151. data/spec/spec_tests/data/change_streams_unified/change-streams-disambiguatedPaths.yml +3 -1
  152. data/spec/spec_tests/data/change_streams_unified/change-streams-errors.yml +3 -1
  153. data/spec/spec_tests/data/change_streams_unified/change-streams-pre_and_post_images.yml +1 -1
  154. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-allowlist.yml +1 -1
  155. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-errorLabels.yml +1 -1
  156. data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +1 -1
  157. data/spec/spec_tests/data/client_side_encryption/badQueries.yml +2 -1
  158. data/spec/spec_tests/data/client_side_encryption/timeoutMS.yml +67 -0
  159. data/spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml +87 -0
  160. data/spec/spec_tests/data/client_side_operations_timeout/change-streams.yml +358 -0
  161. data/spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml +129 -0
  162. data/spec/spec_tests/data/client_side_operations_timeout/command-execution.yml +250 -0
  163. data/spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml +113 -0
  164. data/spec/spec_tests/data/client_side_operations_timeout/cursors.yml +70 -0
  165. data/spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml +3982 -0
  166. data/spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml +96 -0
  167. data/spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml +3236 -0
  168. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml +207 -0
  169. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml +152 -0
  170. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml +182 -0
  171. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml +100 -0
  172. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml +249 -0
  173. data/spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml +204 -0
  174. data/spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml +307 -0
  175. data/spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml +1877 -0
  176. data/spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml +1918 -0
  177. data/spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml +1676 -0
  178. data/spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml +2824 -0
  179. data/spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml +168 -0
  180. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml +171 -0
  181. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml +168 -0
  182. data/spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml +247 -0
  183. data/spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml +181 -0
  184. data/spec/spec_tests/data/crud_unified/aggregate-write-readPreference.yml +4 -0
  185. data/spec/spec_tests/data/crud_unified/db-aggregate-write-readPreference.yml +4 -0
  186. data/spec/spec_tests/data/crud_unified/find-test-all-options.yml +29 -0
  187. data/spec/spec_tests/server_selection_rtt_spec.rb +6 -6
  188. data/spec/support/certificates/atlas-ocsp-ca.crt +81 -83
  189. data/spec/support/certificates/atlas-ocsp.crt +107 -107
  190. data/spec/support/cluster_tools.rb +3 -3
  191. data/spec/support/common_shortcuts.rb +2 -2
  192. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Date.json +1 -1
  193. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalNoPrecision.json +1 -1
  194. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalPrecision.json +1 -1
  195. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoubleNoPrecision.json +1 -1
  196. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoublePrecision.json +1 -1
  197. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Int.json +1 -1
  198. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Long.json +1 -1
  199. data/spec/support/shared/session.rb +2 -2
  200. data/spec/support/spec_setup.rb +2 -2
  201. data/spec/support/utils.rb +3 -1
  202. metadata +78 -91
  203. data/spec/mongo/server/round_trip_time_averager_spec.rb +0 -48
  204. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml +0 -242
  205. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml +0 -423
  206. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml +0 -183
  207. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml +0 -240
  208. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml +0 -236
  209. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml +0 -253
  210. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml +0 -1688
  211. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml +0 -294
  212. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml +0 -906
  213. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml +0 -1685
  214. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml +0 -1681
  215. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml +0 -1698
  216. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml +0 -330
  217. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml +0 -425
  218. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml +0 -227
  219. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml +0 -328
  220. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml +0 -320
  221. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml +0 -337
  222. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml +0 -914
  223. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml +0 -293
  224. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml +0 -519
  225. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml +0 -912
  226. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml +0 -908
  227. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml +0 -925
  228. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml +0 -326
  229. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml +0 -425
  230. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml +0 -225
  231. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml +0 -324
  232. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml +0 -320
  233. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml +0 -339
  234. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml +0 -242
  235. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml +0 -424
  236. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml +0 -183
  237. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml +0 -240
  238. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml +0 -236
  239. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml +0 -255
  240. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml +0 -242
  241. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml +0 -423
  242. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml +0 -183
  243. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml +0 -240
  244. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml +0 -236
  245. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml +0 -255
  246. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml +0 -44
@@ -0,0 +1,3982 @@
1
+ description: "operations ignore deprecated timeout options if timeoutMS is set"
2
+
3
+ schemaVersion: "1.9"
4
+
5
+ # Most tests in this file can be executed against any server version, but some tests execute operations that are only
6
+ # available on higher server versions (e.g. abortTransaction). To avoid too many special cases in templated tests, the
7
+ # min server version is set to 4.2 for all.
8
+ runOnRequirements:
9
+ - minServerVersion: "4.2"
10
+ topologies: ["replicaset", "sharded"]
11
+
12
+ createEntities:
13
+ - client:
14
+ id: &failPointClient failPointClient
15
+ useMultipleMongoses: false
16
+
17
+ initialData:
18
+ - collectionName: &collectionName coll
19
+ databaseName: &databaseName test
20
+ documents: []
21
+
22
+ tests:
23
+ # For each operation, run these tests:
24
+ #
25
+ # 1. socketTimeoutMS is ignored if timeoutMS is set. The test creates a client with socketTimeoutMS=1, configures and
26
+ # a failpoint to block the operation for 5ms, runs the operation with timeoutMS=10000, and expects it to succeed.
27
+ #
28
+ # 2. wTimeoutMS is ignored if timeoutMS is set. The test creates a client with wTimeoutMS=1, runs the operation with
29
+ # timeoutMS=10000, expects the operation to succeed, and uses command monitoring expectations to assert that the
30
+ # command sent to the server does not contain a writeConcern field.
31
+ #
32
+ # 3. If the operation supports maxTimeMS, it ignores maxTimeMS if timeoutMS is set. The test executes the operation
33
+ # with timeoutMS=1000 and maxTimeMS=5000. It expects the operation to succeed and uses command monitoring expectations
34
+ # to assert that the actual maxTimeMS value sent was less than or equal to 100, thereby asserting that it was
35
+ # actually derived from timeoutMS.
36
+
37
+ # Tests for commitTransaction. These are not included in the operations loop because the tests need to execute
38
+ # additional "startTransaction" and "insertOne" operations to establish a server-side transaction. There is also one
39
+ # additional test to assert that maxCommitTimeMS is ignored if timeoutMS is set.
40
+
41
+ - description: "commitTransaction ignores socketTimeoutMS if timeoutMS is set"
42
+ operations:
43
+ - name: createEntities
44
+ object: testRunner
45
+ arguments:
46
+ entities:
47
+ - client:
48
+ id: &client client
49
+ uriOptions:
50
+ # This test uses 20 instead of 1 like other tests because socketTimeoutMS also applies to the
51
+ # operation done to start the server-side transaction and it needs time to succeed.
52
+ socketTimeoutMS: 20
53
+ useMultipleMongoses: false
54
+ observeEvents:
55
+ - commandStartedEvent
56
+ ignoreCommandMonitoringEvents: ["aggregate"]
57
+ - database:
58
+ id: &database database
59
+ client: *client
60
+ databaseName: *databaseName
61
+ - collection:
62
+ id: &collection collection
63
+ database: *database
64
+ collectionName: *collectionName
65
+ - session:
66
+ id: &session session
67
+ client: *client
68
+ - name: failPoint
69
+ object: testRunner
70
+ arguments:
71
+ client: *failPointClient
72
+ failPoint:
73
+ configureFailPoint: failCommand
74
+ mode: { times: 1 }
75
+ data:
76
+ failCommands: ["commitTransaction"]
77
+ blockConnection: true
78
+ blockTimeMS: 5
79
+ - name: startTransaction
80
+ object: *session
81
+ - name: countDocuments
82
+ object: *collection
83
+ arguments:
84
+ filter: {}
85
+ session: *session
86
+ - name: commitTransaction
87
+ object: *session
88
+ arguments:
89
+ timeoutMS: 10000
90
+ expectEvents:
91
+ - client: *client
92
+ events:
93
+ - commandStartedEvent:
94
+ commandName: commitTransaction
95
+ databaseName: admin
96
+ command:
97
+ commitTransaction: 1
98
+ writeConcern: { $$exists: false }
99
+ maxTimeMS: { $$type: ["int", "long"] }
100
+
101
+ - description: "commitTransaction ignores wTimeoutMS if timeoutMS is set"
102
+ operations:
103
+ - name: createEntities
104
+ object: testRunner
105
+ arguments:
106
+ entities:
107
+ - client:
108
+ id: &client client
109
+ uriOptions:
110
+ wTimeoutMS: 1
111
+ observeEvents:
112
+ - commandStartedEvent
113
+ ignoreCommandMonitoringEvents: ["aggregate"]
114
+ - database:
115
+ id: &database database
116
+ client: *client
117
+ databaseName: *databaseName
118
+ - collection:
119
+ id: &collection collection
120
+ database: *database
121
+ collectionName: *collectionName
122
+ - session:
123
+ id: &session session
124
+ client: *client
125
+ - name: startTransaction
126
+ object: *session
127
+ - name: countDocuments
128
+ object: *collection
129
+ arguments:
130
+ filter: {}
131
+ session: *session
132
+ - name: commitTransaction
133
+ object: *session
134
+ arguments:
135
+ timeoutMS: 10000
136
+ expectEvents:
137
+ - client: *client
138
+ events:
139
+ - commandStartedEvent:
140
+ commandName: commitTransaction
141
+ databaseName: admin
142
+ command:
143
+ commitTransaction: 1
144
+ writeConcern: { $$exists: false }
145
+ maxTimeMS: { $$type: ["int", "long"] }
146
+
147
+ - description: "commitTransaction ignores maxCommitTimeMS if timeoutMS is set"
148
+ operations:
149
+ - name: createEntities
150
+ object: testRunner
151
+ arguments:
152
+ entities:
153
+ - client:
154
+ id: &client client
155
+ useMultipleMongoses: false
156
+ observeEvents:
157
+ - commandStartedEvent
158
+ ignoreCommandMonitoringEvents: ["aggregate"]
159
+ - database:
160
+ id: &database database
161
+ client: *client
162
+ databaseName: *databaseName
163
+ - collection:
164
+ id: &collection collection
165
+ database: *database
166
+ collectionName: *collectionName
167
+ - session:
168
+ id: &session session
169
+ client: *client
170
+ sessionOptions:
171
+ defaultTransactionOptions:
172
+ maxCommitTimeMS: 5000
173
+ - name: startTransaction
174
+ object: *session
175
+ - name: countDocuments
176
+ object: *collection
177
+ arguments:
178
+ filter: {}
179
+ session: *session
180
+ - name: commitTransaction
181
+ object: *session
182
+ arguments:
183
+ timeoutMS: &timeoutMS 1000
184
+ expectEvents:
185
+ - client: *client
186
+ events:
187
+ - commandStartedEvent:
188
+ commandName: commitTransaction
189
+ databaseName: admin
190
+ command:
191
+ commitTransaction: 1
192
+ # Assert that the final maxTimeMS field is derived from timeoutMS, not maxCommitTimeMS.
193
+ maxTimeMS: { $$lte: *timeoutMS }
194
+
195
+ # Tests for abortTransaction. These are not included in the operations loop because the tests need to execute
196
+ # additional "startTransaction" and "insertOne" operations to establish a server-side transaction.
197
+
198
+ - description: "abortTransaction ignores socketTimeoutMS if timeoutMS is set"
199
+ operations:
200
+ - name: createEntities
201
+ object: testRunner
202
+ arguments:
203
+ entities:
204
+ - client:
205
+ id: &client client
206
+ uriOptions:
207
+ # This test uses 20 instead of 1 like other tests because socketTimeoutMS also applies to the
208
+ # operation done to start the server-side transaction and it needs time to succeed.
209
+ socketTimeoutMS: 20
210
+ useMultipleMongoses: false
211
+ observeEvents:
212
+ - commandStartedEvent
213
+ ignoreCommandMonitoringEvents: ["aggregate"]
214
+ - database:
215
+ id: &database database
216
+ client: *client
217
+ databaseName: *databaseName
218
+ - collection:
219
+ id: &collection collection
220
+ database: *database
221
+ collectionName: *collectionName
222
+ - session:
223
+ id: &session session
224
+ client: *client
225
+ - name: failPoint
226
+ object: testRunner
227
+ arguments:
228
+ client: *failPointClient
229
+ failPoint:
230
+ configureFailPoint: failCommand
231
+ mode: { times: 1 }
232
+ data:
233
+ failCommands: ["abortTransaction"]
234
+ blockConnection: true
235
+ blockTimeMS: 5
236
+ - name: startTransaction
237
+ object: *session
238
+ - name: countDocuments
239
+ object: *collection
240
+ arguments:
241
+ filter: {}
242
+ session: *session
243
+ - name: abortTransaction
244
+ object: *session
245
+ arguments:
246
+ timeoutMS: 10000
247
+ expectEvents:
248
+ - client: *client
249
+ events:
250
+ - commandStartedEvent:
251
+ commandName: abortTransaction
252
+ databaseName: admin
253
+ command:
254
+ abortTransaction: 1
255
+ writeConcern: { $$exists: false }
256
+ maxTimeMS: { $$type: ["int", "long"] }
257
+
258
+ - description: "abortTransaction ignores wTimeoutMS if timeoutMS is set"
259
+ operations:
260
+ - name: createEntities
261
+ object: testRunner
262
+ arguments:
263
+ entities:
264
+ - client:
265
+ id: &client client
266
+ uriOptions:
267
+ wTimeoutMS: 1
268
+ observeEvents:
269
+ - commandStartedEvent
270
+ ignoreCommandMonitoringEvents: ["aggregate"]
271
+ - database:
272
+ id: &database database
273
+ client: *client
274
+ databaseName: *databaseName
275
+ - collection:
276
+ id: &collection collection
277
+ database: *database
278
+ collectionName: *collectionName
279
+ - session:
280
+ id: &session session
281
+ client: *client
282
+ - name: startTransaction
283
+ object: *session
284
+ - name: countDocuments
285
+ object: *collection
286
+ arguments:
287
+ filter: {}
288
+ session: *session
289
+ - name: abortTransaction
290
+ object: *session
291
+ arguments:
292
+ timeoutMS: 10000
293
+ expectEvents:
294
+ - client: *client
295
+ events:
296
+ - commandStartedEvent:
297
+ commandName: abortTransaction
298
+ databaseName: admin
299
+ command:
300
+ abortTransaction: 1
301
+ writeConcern: { $$exists: false }
302
+ maxTimeMS: { $$type: ["int", "long"] }
303
+
304
+ # Tests for withTransaction. These are not included in the operations loop because the command monitoring
305
+ # expectations contain multiple commands. There is also one additional test to assert that maxCommitTimeMS is ignored
306
+ # if timeoutMS is set.
307
+
308
+ - description: "withTransaction ignores socketTimeoutMS if timeoutMS is set"
309
+ operations:
310
+ - name: createEntities
311
+ object: testRunner
312
+ arguments:
313
+ entities:
314
+ - client:
315
+ id: &client client
316
+ uriOptions:
317
+ # This test uses 20 instead of 1 like other tests because socketTimeoutMS also applies to the
318
+ # operation done to start the server-side transaction and it needs time to succeed.
319
+ socketTimeoutMS: 20
320
+ useMultipleMongoses: false
321
+ observeEvents:
322
+ - commandStartedEvent
323
+ - database:
324
+ id: &database database
325
+ client: *client
326
+ databaseName: *databaseName
327
+ - collection:
328
+ id: &collection collection
329
+ database: *database
330
+ collectionName: *collectionName
331
+ - session:
332
+ id: &session session
333
+ client: *client
334
+ - name: failPoint
335
+ object: testRunner
336
+ arguments:
337
+ client: *failPointClient
338
+ failPoint:
339
+ configureFailPoint: failCommand
340
+ mode: { times: 1 }
341
+ data:
342
+ failCommands: ["commitTransaction"]
343
+ blockConnection: true
344
+ blockTimeMS: 5
345
+ - name: withTransaction
346
+ object: *session
347
+ arguments:
348
+ timeoutMS: 10000
349
+ callback:
350
+ - name: countDocuments
351
+ object: *collection
352
+ arguments:
353
+ filter: {}
354
+ session: *session
355
+ expectEvents:
356
+ - client: *client
357
+ events:
358
+ - commandStartedEvent:
359
+ commandName: aggregate
360
+ databaseName: *databaseName
361
+ command:
362
+ aggregate: *collectionName
363
+ maxTimeMS: { $$type: ["int", "long"] }
364
+ - commandStartedEvent:
365
+ commandName: commitTransaction
366
+ databaseName: admin
367
+ command:
368
+ commitTransaction: 1
369
+ writeConcern: { $$exists: false }
370
+ maxTimeMS: { $$type: ["int", "long"] }
371
+
372
+ - description: "withTransaction ignores wTimeoutMS if timeoutMS is set"
373
+ operations:
374
+ - name: createEntities
375
+ object: testRunner
376
+ arguments:
377
+ entities:
378
+ - client:
379
+ id: &client client
380
+ uriOptions:
381
+ wTimeoutMS: 1
382
+ observeEvents:
383
+ - commandStartedEvent
384
+ - database:
385
+ id: &database database
386
+ client: *client
387
+ databaseName: *databaseName
388
+ - collection:
389
+ id: &collection collection
390
+ database: *database
391
+ collectionName: *collectionName
392
+ - session:
393
+ id: &session session
394
+ client: *client
395
+ - name: withTransaction
396
+ object: *session
397
+ arguments:
398
+ timeoutMS: 10000
399
+ callback:
400
+ - name: countDocuments
401
+ object: *collection
402
+ arguments:
403
+ filter: {}
404
+ session: *session
405
+ expectEvents:
406
+ - client: *client
407
+ events:
408
+ - commandStartedEvent:
409
+ commandName: aggregate
410
+ databaseName: *databaseName
411
+ command:
412
+ aggregate: *collectionName
413
+ writeConcern: { $$exists: false }
414
+ maxTimeMS: { $$type: ["int", "long"] }
415
+ - commandStartedEvent:
416
+ commandName: commitTransaction
417
+ databaseName: admin
418
+ command:
419
+ commitTransaction: 1
420
+ writeConcern: { $$exists: false }
421
+ maxTimeMS: { $$type: ["int", "long"] }
422
+
423
+ - description: "withTransaction ignores maxCommitTimeMS if timeoutMS is set"
424
+ operations:
425
+ - name: createEntities
426
+ object: testRunner
427
+ arguments:
428
+ entities:
429
+ - client:
430
+ id: &client client
431
+ useMultipleMongoses: false
432
+ observeEvents:
433
+ - commandStartedEvent
434
+ - database:
435
+ id: &database database
436
+ client: *client
437
+ databaseName: *databaseName
438
+ - collection:
439
+ id: &collection collection
440
+ database: *database
441
+ collectionName: *collectionName
442
+ - session:
443
+ id: &session session
444
+ client: *client
445
+ sessionOptions:
446
+ defaultTransactionOptions:
447
+ maxCommitTimeMS: 5000
448
+ - name: withTransaction
449
+ object: *session
450
+ arguments:
451
+ timeoutMS: &timeoutMS 1000
452
+ callback:
453
+ - name: countDocuments
454
+ object: *collection
455
+ arguments:
456
+ filter: {}
457
+ session: *session
458
+ expectEvents:
459
+ - client: *client
460
+ events:
461
+ - commandStartedEvent:
462
+ commandName: aggregate
463
+ databaseName: *databaseName
464
+ command:
465
+ aggregate: *collectionName
466
+ writeConcern: { $$exists: false }
467
+ maxTimeMS: { $$type: ["int", "long"] }
468
+ - commandStartedEvent:
469
+ commandName: commitTransaction
470
+ databaseName: admin
471
+ command:
472
+ commitTransaction: 1
473
+ # Assert that the final maxTimeMS field is derived from timeoutMS, not maxCommitTimeMS.
474
+ maxTimeMS: { $$lte: *timeoutMS }
475
+
476
+ # Tests for operations that can be generated.
477
+
478
+
479
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - listDatabases on client"
480
+ operations:
481
+ - name: createEntities
482
+ object: testRunner
483
+ arguments:
484
+ entities:
485
+ - client:
486
+ id: &client client
487
+ uriOptions:
488
+ socketTimeoutMS: 1
489
+ useMultipleMongoses: false
490
+ - database:
491
+ id: &database database
492
+ client: *client
493
+ databaseName: *databaseName
494
+ - collection:
495
+ id: &collection collection
496
+ database: *database
497
+ collectionName: *collectionName
498
+ - bucket:
499
+ id: &bucket bucket
500
+ database: *database
501
+ - session:
502
+ id: &session session
503
+ client: *client
504
+ - name: failPoint
505
+ object: testRunner
506
+ arguments:
507
+ client: *failPointClient
508
+ failPoint:
509
+ configureFailPoint: failCommand
510
+ mode: { times: 1 }
511
+ data:
512
+ failCommands: ["listDatabases"]
513
+ blockConnection: true
514
+ blockTimeMS: 5
515
+ - name: listDatabases
516
+ object: *client
517
+ arguments:
518
+ timeoutMS: 100000
519
+ filter: {}
520
+
521
+
522
+
523
+ - description: "wTimeoutMS is ignored if timeoutMS is set - listDatabases on client"
524
+ operations:
525
+ - name: createEntities
526
+ object: testRunner
527
+ arguments:
528
+ entities:
529
+ - client:
530
+ id: &client client
531
+ uriOptions:
532
+ wTimeoutMS: 1
533
+ observeEvents:
534
+ - commandStartedEvent
535
+ ignoreCommandMonitoringEvents:
536
+ - killCursors
537
+ - database:
538
+ id: &database database
539
+ client: *client
540
+ databaseName: *databaseName
541
+ - collection:
542
+ id: &collection collection
543
+ database: *database
544
+ collectionName: *collectionName
545
+ - bucket:
546
+ id: &bucket bucket
547
+ database: *database
548
+ - session:
549
+ id: &session session
550
+ client: *client
551
+ - name: listDatabases
552
+ object: *client
553
+ arguments:
554
+ timeoutMS: 100000
555
+ filter: {}
556
+
557
+
558
+ expectEvents:
559
+ - client: *client
560
+ events:
561
+ - commandStartedEvent:
562
+ commandName: listDatabases
563
+ databaseName: admin
564
+ command:
565
+ listDatabases: 1
566
+ writeConcern: { $$exists: false }
567
+ maxTimeMS: { $$type: ["int", "long"] }
568
+
569
+
570
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - listDatabaseNames on client"
571
+ operations:
572
+ - name: createEntities
573
+ object: testRunner
574
+ arguments:
575
+ entities:
576
+ - client:
577
+ id: &client client
578
+ uriOptions:
579
+ socketTimeoutMS: 1
580
+ useMultipleMongoses: false
581
+ - database:
582
+ id: &database database
583
+ client: *client
584
+ databaseName: *databaseName
585
+ - collection:
586
+ id: &collection collection
587
+ database: *database
588
+ collectionName: *collectionName
589
+ - bucket:
590
+ id: &bucket bucket
591
+ database: *database
592
+ - session:
593
+ id: &session session
594
+ client: *client
595
+ - name: failPoint
596
+ object: testRunner
597
+ arguments:
598
+ client: *failPointClient
599
+ failPoint:
600
+ configureFailPoint: failCommand
601
+ mode: { times: 1 }
602
+ data:
603
+ failCommands: ["listDatabases"]
604
+ blockConnection: true
605
+ blockTimeMS: 5
606
+ - name: listDatabaseNames
607
+ object: *client
608
+ arguments:
609
+ timeoutMS: 100000
610
+
611
+
612
+
613
+ - description: "wTimeoutMS is ignored if timeoutMS is set - listDatabaseNames on client"
614
+ operations:
615
+ - name: createEntities
616
+ object: testRunner
617
+ arguments:
618
+ entities:
619
+ - client:
620
+ id: &client client
621
+ uriOptions:
622
+ wTimeoutMS: 1
623
+ observeEvents:
624
+ - commandStartedEvent
625
+ ignoreCommandMonitoringEvents:
626
+ - killCursors
627
+ - database:
628
+ id: &database database
629
+ client: *client
630
+ databaseName: *databaseName
631
+ - collection:
632
+ id: &collection collection
633
+ database: *database
634
+ collectionName: *collectionName
635
+ - bucket:
636
+ id: &bucket bucket
637
+ database: *database
638
+ - session:
639
+ id: &session session
640
+ client: *client
641
+ - name: listDatabaseNames
642
+ object: *client
643
+ arguments:
644
+ timeoutMS: 100000
645
+
646
+
647
+ expectEvents:
648
+ - client: *client
649
+ events:
650
+ - commandStartedEvent:
651
+ commandName: listDatabases
652
+ databaseName: admin
653
+ command:
654
+ listDatabases: 1
655
+ writeConcern: { $$exists: false }
656
+ maxTimeMS: { $$type: ["int", "long"] }
657
+
658
+
659
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - createChangeStream on client"
660
+ operations:
661
+ - name: createEntities
662
+ object: testRunner
663
+ arguments:
664
+ entities:
665
+ - client:
666
+ id: &client client
667
+ uriOptions:
668
+ socketTimeoutMS: 1
669
+ useMultipleMongoses: false
670
+ - database:
671
+ id: &database database
672
+ client: *client
673
+ databaseName: *databaseName
674
+ - collection:
675
+ id: &collection collection
676
+ database: *database
677
+ collectionName: *collectionName
678
+ - bucket:
679
+ id: &bucket bucket
680
+ database: *database
681
+ - session:
682
+ id: &session session
683
+ client: *client
684
+ - name: failPoint
685
+ object: testRunner
686
+ arguments:
687
+ client: *failPointClient
688
+ failPoint:
689
+ configureFailPoint: failCommand
690
+ mode: { times: 1 }
691
+ data:
692
+ failCommands: ["aggregate"]
693
+ blockConnection: true
694
+ blockTimeMS: 5
695
+ - name: createChangeStream
696
+ object: *client
697
+ arguments:
698
+ timeoutMS: 100000
699
+ pipeline: []
700
+
701
+
702
+
703
+ - description: "wTimeoutMS is ignored if timeoutMS is set - createChangeStream on client"
704
+ operations:
705
+ - name: createEntities
706
+ object: testRunner
707
+ arguments:
708
+ entities:
709
+ - client:
710
+ id: &client client
711
+ uriOptions:
712
+ wTimeoutMS: 1
713
+ observeEvents:
714
+ - commandStartedEvent
715
+ ignoreCommandMonitoringEvents:
716
+ - killCursors
717
+ - database:
718
+ id: &database database
719
+ client: *client
720
+ databaseName: *databaseName
721
+ - collection:
722
+ id: &collection collection
723
+ database: *database
724
+ collectionName: *collectionName
725
+ - bucket:
726
+ id: &bucket bucket
727
+ database: *database
728
+ - session:
729
+ id: &session session
730
+ client: *client
731
+ - name: createChangeStream
732
+ object: *client
733
+ arguments:
734
+ timeoutMS: 100000
735
+ pipeline: []
736
+
737
+
738
+ expectEvents:
739
+ - client: *client
740
+ events:
741
+ - commandStartedEvent:
742
+ commandName: aggregate
743
+ databaseName: admin
744
+ command:
745
+ aggregate: 1
746
+ writeConcern: { $$exists: false }
747
+ maxTimeMS: { $$type: ["int", "long"] }
748
+
749
+
750
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - aggregate on database"
751
+ operations:
752
+ - name: createEntities
753
+ object: testRunner
754
+ arguments:
755
+ entities:
756
+ - client:
757
+ id: &client client
758
+ uriOptions:
759
+ socketTimeoutMS: 1
760
+ useMultipleMongoses: false
761
+ - database:
762
+ id: &database database
763
+ client: *client
764
+ databaseName: *databaseName
765
+ - collection:
766
+ id: &collection collection
767
+ database: *database
768
+ collectionName: *collectionName
769
+ - bucket:
770
+ id: &bucket bucket
771
+ database: *database
772
+ - session:
773
+ id: &session session
774
+ client: *client
775
+ - name: failPoint
776
+ object: testRunner
777
+ arguments:
778
+ client: *failPointClient
779
+ failPoint:
780
+ configureFailPoint: failCommand
781
+ mode: { times: 1 }
782
+ data:
783
+ failCommands: ["aggregate"]
784
+ blockConnection: true
785
+ blockTimeMS: 5
786
+ - name: aggregate
787
+ object: *database
788
+ arguments:
789
+ timeoutMS: 100000
790
+ pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ]
791
+
792
+
793
+
794
+ - description: "wTimeoutMS is ignored if timeoutMS is set - aggregate on database"
795
+ operations:
796
+ - name: createEntities
797
+ object: testRunner
798
+ arguments:
799
+ entities:
800
+ - client:
801
+ id: &client client
802
+ uriOptions:
803
+ wTimeoutMS: 1
804
+ observeEvents:
805
+ - commandStartedEvent
806
+ ignoreCommandMonitoringEvents:
807
+ - killCursors
808
+ - database:
809
+ id: &database database
810
+ client: *client
811
+ databaseName: *databaseName
812
+ - collection:
813
+ id: &collection collection
814
+ database: *database
815
+ collectionName: *collectionName
816
+ - bucket:
817
+ id: &bucket bucket
818
+ database: *database
819
+ - session:
820
+ id: &session session
821
+ client: *client
822
+ - name: aggregate
823
+ object: *database
824
+ arguments:
825
+ timeoutMS: 100000
826
+ pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ]
827
+
828
+
829
+ expectEvents:
830
+ - client: *client
831
+ events:
832
+ - commandStartedEvent:
833
+ commandName: aggregate
834
+ databaseName: *databaseName
835
+ command:
836
+ aggregate: 1
837
+ writeConcern: { $$exists: false }
838
+ maxTimeMS: { $$type: ["int", "long"] }
839
+
840
+ - description: "maxTimeMS is ignored if timeoutMS is set - aggregate on database"
841
+ operations:
842
+ - name: createEntities
843
+ object: testRunner
844
+ arguments:
845
+ entities:
846
+ - client:
847
+ id: &client client
848
+ useMultipleMongoses: false
849
+ observeEvents:
850
+ - commandStartedEvent
851
+ ignoreCommandMonitoringEvents:
852
+ - killCursors
853
+ - database:
854
+ id: &database database
855
+ client: *client
856
+ databaseName: *databaseName
857
+ - collection:
858
+ id: &collection collection
859
+ database: *database
860
+ collectionName: *collectionName
861
+ - bucket:
862
+ id: &bucket bucket
863
+ database: *database
864
+ - session:
865
+ id: &session session
866
+ client: *client
867
+ - name: aggregate
868
+ object: *database
869
+ arguments:
870
+ timeoutMS: &timeoutMS 1000
871
+ maxTimeMS: 5000
872
+ pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ]
873
+
874
+
875
+ expectEvents:
876
+ - client: *client
877
+ events:
878
+ - commandStartedEvent:
879
+ commandName: aggregate
880
+ databaseName: *databaseName
881
+ command:
882
+ aggregate: 1
883
+ maxTimeMS: { $$lte: *timeoutMS }
884
+
885
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - listCollections on database"
886
+ operations:
887
+ - name: createEntities
888
+ object: testRunner
889
+ arguments:
890
+ entities:
891
+ - client:
892
+ id: &client client
893
+ uriOptions:
894
+ socketTimeoutMS: 1
895
+ useMultipleMongoses: false
896
+ - database:
897
+ id: &database database
898
+ client: *client
899
+ databaseName: *databaseName
900
+ - collection:
901
+ id: &collection collection
902
+ database: *database
903
+ collectionName: *collectionName
904
+ - bucket:
905
+ id: &bucket bucket
906
+ database: *database
907
+ - session:
908
+ id: &session session
909
+ client: *client
910
+ - name: failPoint
911
+ object: testRunner
912
+ arguments:
913
+ client: *failPointClient
914
+ failPoint:
915
+ configureFailPoint: failCommand
916
+ mode: { times: 1 }
917
+ data:
918
+ failCommands: ["listCollections"]
919
+ blockConnection: true
920
+ blockTimeMS: 5
921
+ - name: listCollections
922
+ object: *database
923
+ arguments:
924
+ timeoutMS: 100000
925
+ filter: {}
926
+
927
+
928
+
929
+ - description: "wTimeoutMS is ignored if timeoutMS is set - listCollections on database"
930
+ operations:
931
+ - name: createEntities
932
+ object: testRunner
933
+ arguments:
934
+ entities:
935
+ - client:
936
+ id: &client client
937
+ uriOptions:
938
+ wTimeoutMS: 1
939
+ observeEvents:
940
+ - commandStartedEvent
941
+ ignoreCommandMonitoringEvents:
942
+ - killCursors
943
+ - database:
944
+ id: &database database
945
+ client: *client
946
+ databaseName: *databaseName
947
+ - collection:
948
+ id: &collection collection
949
+ database: *database
950
+ collectionName: *collectionName
951
+ - bucket:
952
+ id: &bucket bucket
953
+ database: *database
954
+ - session:
955
+ id: &session session
956
+ client: *client
957
+ - name: listCollections
958
+ object: *database
959
+ arguments:
960
+ timeoutMS: 100000
961
+ filter: {}
962
+
963
+
964
+ expectEvents:
965
+ - client: *client
966
+ events:
967
+ - commandStartedEvent:
968
+ commandName: listCollections
969
+ databaseName: *databaseName
970
+ command:
971
+ listCollections: 1
972
+ writeConcern: { $$exists: false }
973
+ maxTimeMS: { $$type: ["int", "long"] }
974
+
975
+
976
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - listCollectionNames on database"
977
+ operations:
978
+ - name: createEntities
979
+ object: testRunner
980
+ arguments:
981
+ entities:
982
+ - client:
983
+ id: &client client
984
+ uriOptions:
985
+ socketTimeoutMS: 1
986
+ useMultipleMongoses: false
987
+ - database:
988
+ id: &database database
989
+ client: *client
990
+ databaseName: *databaseName
991
+ - collection:
992
+ id: &collection collection
993
+ database: *database
994
+ collectionName: *collectionName
995
+ - bucket:
996
+ id: &bucket bucket
997
+ database: *database
998
+ - session:
999
+ id: &session session
1000
+ client: *client
1001
+ - name: failPoint
1002
+ object: testRunner
1003
+ arguments:
1004
+ client: *failPointClient
1005
+ failPoint:
1006
+ configureFailPoint: failCommand
1007
+ mode: { times: 1 }
1008
+ data:
1009
+ failCommands: ["listCollections"]
1010
+ blockConnection: true
1011
+ blockTimeMS: 5
1012
+ - name: listCollectionNames
1013
+ object: *database
1014
+ arguments:
1015
+ timeoutMS: 100000
1016
+ filter: {}
1017
+
1018
+
1019
+
1020
+ - description: "wTimeoutMS is ignored if timeoutMS is set - listCollectionNames on database"
1021
+ operations:
1022
+ - name: createEntities
1023
+ object: testRunner
1024
+ arguments:
1025
+ entities:
1026
+ - client:
1027
+ id: &client client
1028
+ uriOptions:
1029
+ wTimeoutMS: 1
1030
+ observeEvents:
1031
+ - commandStartedEvent
1032
+ ignoreCommandMonitoringEvents:
1033
+ - killCursors
1034
+ - database:
1035
+ id: &database database
1036
+ client: *client
1037
+ databaseName: *databaseName
1038
+ - collection:
1039
+ id: &collection collection
1040
+ database: *database
1041
+ collectionName: *collectionName
1042
+ - bucket:
1043
+ id: &bucket bucket
1044
+ database: *database
1045
+ - session:
1046
+ id: &session session
1047
+ client: *client
1048
+ - name: listCollectionNames
1049
+ object: *database
1050
+ arguments:
1051
+ timeoutMS: 100000
1052
+ filter: {}
1053
+
1054
+
1055
+ expectEvents:
1056
+ - client: *client
1057
+ events:
1058
+ - commandStartedEvent:
1059
+ commandName: listCollections
1060
+ databaseName: *databaseName
1061
+ command:
1062
+ listCollections: 1
1063
+ writeConcern: { $$exists: false }
1064
+ maxTimeMS: { $$type: ["int", "long"] }
1065
+
1066
+
1067
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - runCommand on database"
1068
+ operations:
1069
+ - name: createEntities
1070
+ object: testRunner
1071
+ arguments:
1072
+ entities:
1073
+ - client:
1074
+ id: &client client
1075
+ uriOptions:
1076
+ socketTimeoutMS: 1
1077
+ useMultipleMongoses: false
1078
+ - database:
1079
+ id: &database database
1080
+ client: *client
1081
+ databaseName: *databaseName
1082
+ - collection:
1083
+ id: &collection collection
1084
+ database: *database
1085
+ collectionName: *collectionName
1086
+ - bucket:
1087
+ id: &bucket bucket
1088
+ database: *database
1089
+ - session:
1090
+ id: &session session
1091
+ client: *client
1092
+ - name: failPoint
1093
+ object: testRunner
1094
+ arguments:
1095
+ client: *failPointClient
1096
+ failPoint:
1097
+ configureFailPoint: failCommand
1098
+ mode: { times: 1 }
1099
+ data:
1100
+ failCommands: ["ping"]
1101
+ blockConnection: true
1102
+ blockTimeMS: 5
1103
+ - name: runCommand
1104
+ object: *database
1105
+ arguments:
1106
+ timeoutMS: 100000
1107
+ command: { ping: 1 }
1108
+ commandName: ping
1109
+
1110
+
1111
+
1112
+ - description: "wTimeoutMS is ignored if timeoutMS is set - runCommand on database"
1113
+ operations:
1114
+ - name: createEntities
1115
+ object: testRunner
1116
+ arguments:
1117
+ entities:
1118
+ - client:
1119
+ id: &client client
1120
+ uriOptions:
1121
+ wTimeoutMS: 1
1122
+ observeEvents:
1123
+ - commandStartedEvent
1124
+ ignoreCommandMonitoringEvents:
1125
+ - killCursors
1126
+ - database:
1127
+ id: &database database
1128
+ client: *client
1129
+ databaseName: *databaseName
1130
+ - collection:
1131
+ id: &collection collection
1132
+ database: *database
1133
+ collectionName: *collectionName
1134
+ - bucket:
1135
+ id: &bucket bucket
1136
+ database: *database
1137
+ - session:
1138
+ id: &session session
1139
+ client: *client
1140
+ - name: runCommand
1141
+ object: *database
1142
+ arguments:
1143
+ timeoutMS: 100000
1144
+ command: { ping: 1 }
1145
+ commandName: ping
1146
+
1147
+
1148
+ expectEvents:
1149
+ - client: *client
1150
+ events:
1151
+ - commandStartedEvent:
1152
+ commandName: ping
1153
+ databaseName: *databaseName
1154
+ command:
1155
+ ping: 1
1156
+ writeConcern: { $$exists: false }
1157
+ maxTimeMS: { $$type: ["int", "long"] }
1158
+
1159
+
1160
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - createChangeStream on database"
1161
+ operations:
1162
+ - name: createEntities
1163
+ object: testRunner
1164
+ arguments:
1165
+ entities:
1166
+ - client:
1167
+ id: &client client
1168
+ uriOptions:
1169
+ socketTimeoutMS: 1
1170
+ useMultipleMongoses: false
1171
+ - database:
1172
+ id: &database database
1173
+ client: *client
1174
+ databaseName: *databaseName
1175
+ - collection:
1176
+ id: &collection collection
1177
+ database: *database
1178
+ collectionName: *collectionName
1179
+ - bucket:
1180
+ id: &bucket bucket
1181
+ database: *database
1182
+ - session:
1183
+ id: &session session
1184
+ client: *client
1185
+ - name: failPoint
1186
+ object: testRunner
1187
+ arguments:
1188
+ client: *failPointClient
1189
+ failPoint:
1190
+ configureFailPoint: failCommand
1191
+ mode: { times: 1 }
1192
+ data:
1193
+ failCommands: ["aggregate"]
1194
+ blockConnection: true
1195
+ blockTimeMS: 5
1196
+ - name: createChangeStream
1197
+ object: *database
1198
+ arguments:
1199
+ timeoutMS: 100000
1200
+ pipeline: []
1201
+
1202
+
1203
+
1204
+ - description: "wTimeoutMS is ignored if timeoutMS is set - createChangeStream on database"
1205
+ operations:
1206
+ - name: createEntities
1207
+ object: testRunner
1208
+ arguments:
1209
+ entities:
1210
+ - client:
1211
+ id: &client client
1212
+ uriOptions:
1213
+ wTimeoutMS: 1
1214
+ observeEvents:
1215
+ - commandStartedEvent
1216
+ ignoreCommandMonitoringEvents:
1217
+ - killCursors
1218
+ - database:
1219
+ id: &database database
1220
+ client: *client
1221
+ databaseName: *databaseName
1222
+ - collection:
1223
+ id: &collection collection
1224
+ database: *database
1225
+ collectionName: *collectionName
1226
+ - bucket:
1227
+ id: &bucket bucket
1228
+ database: *database
1229
+ - session:
1230
+ id: &session session
1231
+ client: *client
1232
+ - name: createChangeStream
1233
+ object: *database
1234
+ arguments:
1235
+ timeoutMS: 100000
1236
+ pipeline: []
1237
+
1238
+
1239
+ expectEvents:
1240
+ - client: *client
1241
+ events:
1242
+ - commandStartedEvent:
1243
+ commandName: aggregate
1244
+ databaseName: *databaseName
1245
+ command:
1246
+ aggregate: 1
1247
+ writeConcern: { $$exists: false }
1248
+ maxTimeMS: { $$type: ["int", "long"] }
1249
+
1250
+
1251
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - aggregate on collection"
1252
+ operations:
1253
+ - name: createEntities
1254
+ object: testRunner
1255
+ arguments:
1256
+ entities:
1257
+ - client:
1258
+ id: &client client
1259
+ uriOptions:
1260
+ socketTimeoutMS: 1
1261
+ useMultipleMongoses: false
1262
+ - database:
1263
+ id: &database database
1264
+ client: *client
1265
+ databaseName: *databaseName
1266
+ - collection:
1267
+ id: &collection collection
1268
+ database: *database
1269
+ collectionName: *collectionName
1270
+ - bucket:
1271
+ id: &bucket bucket
1272
+ database: *database
1273
+ - session:
1274
+ id: &session session
1275
+ client: *client
1276
+ - name: failPoint
1277
+ object: testRunner
1278
+ arguments:
1279
+ client: *failPointClient
1280
+ failPoint:
1281
+ configureFailPoint: failCommand
1282
+ mode: { times: 1 }
1283
+ data:
1284
+ failCommands: ["aggregate"]
1285
+ blockConnection: true
1286
+ blockTimeMS: 5
1287
+ - name: aggregate
1288
+ object: *collection
1289
+ arguments:
1290
+ timeoutMS: 100000
1291
+ pipeline: []
1292
+
1293
+
1294
+
1295
+ - description: "wTimeoutMS is ignored if timeoutMS is set - aggregate on collection"
1296
+ operations:
1297
+ - name: createEntities
1298
+ object: testRunner
1299
+ arguments:
1300
+ entities:
1301
+ - client:
1302
+ id: &client client
1303
+ uriOptions:
1304
+ wTimeoutMS: 1
1305
+ observeEvents:
1306
+ - commandStartedEvent
1307
+ ignoreCommandMonitoringEvents:
1308
+ - killCursors
1309
+ - database:
1310
+ id: &database database
1311
+ client: *client
1312
+ databaseName: *databaseName
1313
+ - collection:
1314
+ id: &collection collection
1315
+ database: *database
1316
+ collectionName: *collectionName
1317
+ - bucket:
1318
+ id: &bucket bucket
1319
+ database: *database
1320
+ - session:
1321
+ id: &session session
1322
+ client: *client
1323
+ - name: aggregate
1324
+ object: *collection
1325
+ arguments:
1326
+ timeoutMS: 100000
1327
+ pipeline: []
1328
+
1329
+
1330
+ expectEvents:
1331
+ - client: *client
1332
+ events:
1333
+ - commandStartedEvent:
1334
+ commandName: aggregate
1335
+ databaseName: *databaseName
1336
+ command:
1337
+ aggregate: *collectionName
1338
+ writeConcern: { $$exists: false }
1339
+ maxTimeMS: { $$type: ["int", "long"] }
1340
+
1341
+ - description: "maxTimeMS is ignored if timeoutMS is set - aggregate on collection"
1342
+ operations:
1343
+ - name: createEntities
1344
+ object: testRunner
1345
+ arguments:
1346
+ entities:
1347
+ - client:
1348
+ id: &client client
1349
+ useMultipleMongoses: false
1350
+ observeEvents:
1351
+ - commandStartedEvent
1352
+ ignoreCommandMonitoringEvents:
1353
+ - killCursors
1354
+ - database:
1355
+ id: &database database
1356
+ client: *client
1357
+ databaseName: *databaseName
1358
+ - collection:
1359
+ id: &collection collection
1360
+ database: *database
1361
+ collectionName: *collectionName
1362
+ - bucket:
1363
+ id: &bucket bucket
1364
+ database: *database
1365
+ - session:
1366
+ id: &session session
1367
+ client: *client
1368
+ - name: aggregate
1369
+ object: *collection
1370
+ arguments:
1371
+ timeoutMS: &timeoutMS 1000
1372
+ maxTimeMS: 5000
1373
+ pipeline: []
1374
+
1375
+
1376
+ expectEvents:
1377
+ - client: *client
1378
+ events:
1379
+ - commandStartedEvent:
1380
+ commandName: aggregate
1381
+ databaseName: *databaseName
1382
+ command:
1383
+ aggregate: *collectionName
1384
+ maxTimeMS: { $$lte: *timeoutMS }
1385
+
1386
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - count on collection"
1387
+ operations:
1388
+ - name: createEntities
1389
+ object: testRunner
1390
+ arguments:
1391
+ entities:
1392
+ - client:
1393
+ id: &client client
1394
+ uriOptions:
1395
+ socketTimeoutMS: 1
1396
+ useMultipleMongoses: false
1397
+ - database:
1398
+ id: &database database
1399
+ client: *client
1400
+ databaseName: *databaseName
1401
+ - collection:
1402
+ id: &collection collection
1403
+ database: *database
1404
+ collectionName: *collectionName
1405
+ - bucket:
1406
+ id: &bucket bucket
1407
+ database: *database
1408
+ - session:
1409
+ id: &session session
1410
+ client: *client
1411
+ - name: failPoint
1412
+ object: testRunner
1413
+ arguments:
1414
+ client: *failPointClient
1415
+ failPoint:
1416
+ configureFailPoint: failCommand
1417
+ mode: { times: 1 }
1418
+ data:
1419
+ failCommands: ["count"]
1420
+ blockConnection: true
1421
+ blockTimeMS: 5
1422
+ - name: count
1423
+ object: *collection
1424
+ arguments:
1425
+ timeoutMS: 100000
1426
+ filter: {}
1427
+
1428
+
1429
+
1430
+ - description: "wTimeoutMS is ignored if timeoutMS is set - count on collection"
1431
+ operations:
1432
+ - name: createEntities
1433
+ object: testRunner
1434
+ arguments:
1435
+ entities:
1436
+ - client:
1437
+ id: &client client
1438
+ uriOptions:
1439
+ wTimeoutMS: 1
1440
+ observeEvents:
1441
+ - commandStartedEvent
1442
+ ignoreCommandMonitoringEvents:
1443
+ - killCursors
1444
+ - database:
1445
+ id: &database database
1446
+ client: *client
1447
+ databaseName: *databaseName
1448
+ - collection:
1449
+ id: &collection collection
1450
+ database: *database
1451
+ collectionName: *collectionName
1452
+ - bucket:
1453
+ id: &bucket bucket
1454
+ database: *database
1455
+ - session:
1456
+ id: &session session
1457
+ client: *client
1458
+ - name: count
1459
+ object: *collection
1460
+ arguments:
1461
+ timeoutMS: 100000
1462
+ filter: {}
1463
+
1464
+
1465
+ expectEvents:
1466
+ - client: *client
1467
+ events:
1468
+ - commandStartedEvent:
1469
+ commandName: count
1470
+ databaseName: *databaseName
1471
+ command:
1472
+ count: *collectionName
1473
+ writeConcern: { $$exists: false }
1474
+ maxTimeMS: { $$type: ["int", "long"] }
1475
+
1476
+ - description: "maxTimeMS is ignored if timeoutMS is set - count on collection"
1477
+ operations:
1478
+ - name: createEntities
1479
+ object: testRunner
1480
+ arguments:
1481
+ entities:
1482
+ - client:
1483
+ id: &client client
1484
+ useMultipleMongoses: false
1485
+ observeEvents:
1486
+ - commandStartedEvent
1487
+ ignoreCommandMonitoringEvents:
1488
+ - killCursors
1489
+ - database:
1490
+ id: &database database
1491
+ client: *client
1492
+ databaseName: *databaseName
1493
+ - collection:
1494
+ id: &collection collection
1495
+ database: *database
1496
+ collectionName: *collectionName
1497
+ - bucket:
1498
+ id: &bucket bucket
1499
+ database: *database
1500
+ - session:
1501
+ id: &session session
1502
+ client: *client
1503
+ - name: count
1504
+ object: *collection
1505
+ arguments:
1506
+ timeoutMS: &timeoutMS 1000
1507
+ maxTimeMS: 5000
1508
+ filter: {}
1509
+
1510
+
1511
+ expectEvents:
1512
+ - client: *client
1513
+ events:
1514
+ - commandStartedEvent:
1515
+ commandName: count
1516
+ databaseName: *databaseName
1517
+ command:
1518
+ count: *collectionName
1519
+ maxTimeMS: { $$lte: *timeoutMS }
1520
+
1521
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - countDocuments on collection"
1522
+ operations:
1523
+ - name: createEntities
1524
+ object: testRunner
1525
+ arguments:
1526
+ entities:
1527
+ - client:
1528
+ id: &client client
1529
+ uriOptions:
1530
+ socketTimeoutMS: 1
1531
+ useMultipleMongoses: false
1532
+ - database:
1533
+ id: &database database
1534
+ client: *client
1535
+ databaseName: *databaseName
1536
+ - collection:
1537
+ id: &collection collection
1538
+ database: *database
1539
+ collectionName: *collectionName
1540
+ - bucket:
1541
+ id: &bucket bucket
1542
+ database: *database
1543
+ - session:
1544
+ id: &session session
1545
+ client: *client
1546
+ - name: failPoint
1547
+ object: testRunner
1548
+ arguments:
1549
+ client: *failPointClient
1550
+ failPoint:
1551
+ configureFailPoint: failCommand
1552
+ mode: { times: 1 }
1553
+ data:
1554
+ failCommands: ["aggregate"]
1555
+ blockConnection: true
1556
+ blockTimeMS: 5
1557
+ - name: countDocuments
1558
+ object: *collection
1559
+ arguments:
1560
+ timeoutMS: 100000
1561
+ filter: {}
1562
+
1563
+
1564
+
1565
+ - description: "wTimeoutMS is ignored if timeoutMS is set - countDocuments on collection"
1566
+ operations:
1567
+ - name: createEntities
1568
+ object: testRunner
1569
+ arguments:
1570
+ entities:
1571
+ - client:
1572
+ id: &client client
1573
+ uriOptions:
1574
+ wTimeoutMS: 1
1575
+ observeEvents:
1576
+ - commandStartedEvent
1577
+ ignoreCommandMonitoringEvents:
1578
+ - killCursors
1579
+ - database:
1580
+ id: &database database
1581
+ client: *client
1582
+ databaseName: *databaseName
1583
+ - collection:
1584
+ id: &collection collection
1585
+ database: *database
1586
+ collectionName: *collectionName
1587
+ - bucket:
1588
+ id: &bucket bucket
1589
+ database: *database
1590
+ - session:
1591
+ id: &session session
1592
+ client: *client
1593
+ - name: countDocuments
1594
+ object: *collection
1595
+ arguments:
1596
+ timeoutMS: 100000
1597
+ filter: {}
1598
+
1599
+
1600
+ expectEvents:
1601
+ - client: *client
1602
+ events:
1603
+ - commandStartedEvent:
1604
+ commandName: aggregate
1605
+ databaseName: *databaseName
1606
+ command:
1607
+ aggregate: *collectionName
1608
+ writeConcern: { $$exists: false }
1609
+ maxTimeMS: { $$type: ["int", "long"] }
1610
+
1611
+
1612
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - estimatedDocumentCount on collection"
1613
+ operations:
1614
+ - name: createEntities
1615
+ object: testRunner
1616
+ arguments:
1617
+ entities:
1618
+ - client:
1619
+ id: &client client
1620
+ uriOptions:
1621
+ socketTimeoutMS: 1
1622
+ useMultipleMongoses: false
1623
+ - database:
1624
+ id: &database database
1625
+ client: *client
1626
+ databaseName: *databaseName
1627
+ - collection:
1628
+ id: &collection collection
1629
+ database: *database
1630
+ collectionName: *collectionName
1631
+ - bucket:
1632
+ id: &bucket bucket
1633
+ database: *database
1634
+ - session:
1635
+ id: &session session
1636
+ client: *client
1637
+ - name: failPoint
1638
+ object: testRunner
1639
+ arguments:
1640
+ client: *failPointClient
1641
+ failPoint:
1642
+ configureFailPoint: failCommand
1643
+ mode: { times: 1 }
1644
+ data:
1645
+ failCommands: ["count"]
1646
+ blockConnection: true
1647
+ blockTimeMS: 5
1648
+ - name: estimatedDocumentCount
1649
+ object: *collection
1650
+ arguments:
1651
+ timeoutMS: 100000
1652
+
1653
+
1654
+
1655
+ - description: "wTimeoutMS is ignored if timeoutMS is set - estimatedDocumentCount on collection"
1656
+ operations:
1657
+ - name: createEntities
1658
+ object: testRunner
1659
+ arguments:
1660
+ entities:
1661
+ - client:
1662
+ id: &client client
1663
+ uriOptions:
1664
+ wTimeoutMS: 1
1665
+ observeEvents:
1666
+ - commandStartedEvent
1667
+ ignoreCommandMonitoringEvents:
1668
+ - killCursors
1669
+ - database:
1670
+ id: &database database
1671
+ client: *client
1672
+ databaseName: *databaseName
1673
+ - collection:
1674
+ id: &collection collection
1675
+ database: *database
1676
+ collectionName: *collectionName
1677
+ - bucket:
1678
+ id: &bucket bucket
1679
+ database: *database
1680
+ - session:
1681
+ id: &session session
1682
+ client: *client
1683
+ - name: estimatedDocumentCount
1684
+ object: *collection
1685
+ arguments:
1686
+ timeoutMS: 100000
1687
+
1688
+
1689
+ expectEvents:
1690
+ - client: *client
1691
+ events:
1692
+ - commandStartedEvent:
1693
+ commandName: count
1694
+ databaseName: *databaseName
1695
+ command:
1696
+ count: *collectionName
1697
+ writeConcern: { $$exists: false }
1698
+ maxTimeMS: { $$type: ["int", "long"] }
1699
+
1700
+ - description: "maxTimeMS is ignored if timeoutMS is set - estimatedDocumentCount on collection"
1701
+ operations:
1702
+ - name: createEntities
1703
+ object: testRunner
1704
+ arguments:
1705
+ entities:
1706
+ - client:
1707
+ id: &client client
1708
+ useMultipleMongoses: false
1709
+ observeEvents:
1710
+ - commandStartedEvent
1711
+ ignoreCommandMonitoringEvents:
1712
+ - killCursors
1713
+ - database:
1714
+ id: &database database
1715
+ client: *client
1716
+ databaseName: *databaseName
1717
+ - collection:
1718
+ id: &collection collection
1719
+ database: *database
1720
+ collectionName: *collectionName
1721
+ - bucket:
1722
+ id: &bucket bucket
1723
+ database: *database
1724
+ - session:
1725
+ id: &session session
1726
+ client: *client
1727
+ - name: estimatedDocumentCount
1728
+ object: *collection
1729
+ arguments:
1730
+ timeoutMS: &timeoutMS 1000
1731
+ maxTimeMS: 5000
1732
+
1733
+
1734
+ expectEvents:
1735
+ - client: *client
1736
+ events:
1737
+ - commandStartedEvent:
1738
+ commandName: count
1739
+ databaseName: *databaseName
1740
+ command:
1741
+ count: *collectionName
1742
+ maxTimeMS: { $$lte: *timeoutMS }
1743
+
1744
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - distinct on collection"
1745
+ operations:
1746
+ - name: createEntities
1747
+ object: testRunner
1748
+ arguments:
1749
+ entities:
1750
+ - client:
1751
+ id: &client client
1752
+ uriOptions:
1753
+ socketTimeoutMS: 1
1754
+ useMultipleMongoses: false
1755
+ - database:
1756
+ id: &database database
1757
+ client: *client
1758
+ databaseName: *databaseName
1759
+ - collection:
1760
+ id: &collection collection
1761
+ database: *database
1762
+ collectionName: *collectionName
1763
+ - bucket:
1764
+ id: &bucket bucket
1765
+ database: *database
1766
+ - session:
1767
+ id: &session session
1768
+ client: *client
1769
+ - name: failPoint
1770
+ object: testRunner
1771
+ arguments:
1772
+ client: *failPointClient
1773
+ failPoint:
1774
+ configureFailPoint: failCommand
1775
+ mode: { times: 1 }
1776
+ data:
1777
+ failCommands: ["distinct"]
1778
+ blockConnection: true
1779
+ blockTimeMS: 5
1780
+ - name: distinct
1781
+ object: *collection
1782
+ arguments:
1783
+ timeoutMS: 100000
1784
+ fieldName: x
1785
+ filter: {}
1786
+
1787
+
1788
+
1789
+ - description: "wTimeoutMS is ignored if timeoutMS is set - distinct on collection"
1790
+ operations:
1791
+ - name: createEntities
1792
+ object: testRunner
1793
+ arguments:
1794
+ entities:
1795
+ - client:
1796
+ id: &client client
1797
+ uriOptions:
1798
+ wTimeoutMS: 1
1799
+ observeEvents:
1800
+ - commandStartedEvent
1801
+ ignoreCommandMonitoringEvents:
1802
+ - killCursors
1803
+ - database:
1804
+ id: &database database
1805
+ client: *client
1806
+ databaseName: *databaseName
1807
+ - collection:
1808
+ id: &collection collection
1809
+ database: *database
1810
+ collectionName: *collectionName
1811
+ - bucket:
1812
+ id: &bucket bucket
1813
+ database: *database
1814
+ - session:
1815
+ id: &session session
1816
+ client: *client
1817
+ - name: distinct
1818
+ object: *collection
1819
+ arguments:
1820
+ timeoutMS: 100000
1821
+ fieldName: x
1822
+ filter: {}
1823
+
1824
+
1825
+ expectEvents:
1826
+ - client: *client
1827
+ events:
1828
+ - commandStartedEvent:
1829
+ commandName: distinct
1830
+ databaseName: *databaseName
1831
+ command:
1832
+ distinct: *collectionName
1833
+ writeConcern: { $$exists: false }
1834
+ maxTimeMS: { $$type: ["int", "long"] }
1835
+
1836
+ - description: "maxTimeMS is ignored if timeoutMS is set - distinct on collection"
1837
+ operations:
1838
+ - name: createEntities
1839
+ object: testRunner
1840
+ arguments:
1841
+ entities:
1842
+ - client:
1843
+ id: &client client
1844
+ useMultipleMongoses: false
1845
+ observeEvents:
1846
+ - commandStartedEvent
1847
+ ignoreCommandMonitoringEvents:
1848
+ - killCursors
1849
+ - database:
1850
+ id: &database database
1851
+ client: *client
1852
+ databaseName: *databaseName
1853
+ - collection:
1854
+ id: &collection collection
1855
+ database: *database
1856
+ collectionName: *collectionName
1857
+ - bucket:
1858
+ id: &bucket bucket
1859
+ database: *database
1860
+ - session:
1861
+ id: &session session
1862
+ client: *client
1863
+ - name: distinct
1864
+ object: *collection
1865
+ arguments:
1866
+ timeoutMS: &timeoutMS 1000
1867
+ maxTimeMS: 5000
1868
+ fieldName: x
1869
+ filter: {}
1870
+
1871
+
1872
+ expectEvents:
1873
+ - client: *client
1874
+ events:
1875
+ - commandStartedEvent:
1876
+ commandName: distinct
1877
+ databaseName: *databaseName
1878
+ command:
1879
+ distinct: *collectionName
1880
+ maxTimeMS: { $$lte: *timeoutMS }
1881
+
1882
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - find on collection"
1883
+ operations:
1884
+ - name: createEntities
1885
+ object: testRunner
1886
+ arguments:
1887
+ entities:
1888
+ - client:
1889
+ id: &client client
1890
+ uriOptions:
1891
+ socketTimeoutMS: 1
1892
+ useMultipleMongoses: false
1893
+ - database:
1894
+ id: &database database
1895
+ client: *client
1896
+ databaseName: *databaseName
1897
+ - collection:
1898
+ id: &collection collection
1899
+ database: *database
1900
+ collectionName: *collectionName
1901
+ - bucket:
1902
+ id: &bucket bucket
1903
+ database: *database
1904
+ - session:
1905
+ id: &session session
1906
+ client: *client
1907
+ - name: failPoint
1908
+ object: testRunner
1909
+ arguments:
1910
+ client: *failPointClient
1911
+ failPoint:
1912
+ configureFailPoint: failCommand
1913
+ mode: { times: 1 }
1914
+ data:
1915
+ failCommands: ["find"]
1916
+ blockConnection: true
1917
+ blockTimeMS: 5
1918
+ - name: find
1919
+ object: *collection
1920
+ arguments:
1921
+ timeoutMS: 100000
1922
+ filter: {}
1923
+
1924
+
1925
+
1926
+ - description: "wTimeoutMS is ignored if timeoutMS is set - find on collection"
1927
+ operations:
1928
+ - name: createEntities
1929
+ object: testRunner
1930
+ arguments:
1931
+ entities:
1932
+ - client:
1933
+ id: &client client
1934
+ uriOptions:
1935
+ wTimeoutMS: 1
1936
+ observeEvents:
1937
+ - commandStartedEvent
1938
+ ignoreCommandMonitoringEvents:
1939
+ - killCursors
1940
+ - database:
1941
+ id: &database database
1942
+ client: *client
1943
+ databaseName: *databaseName
1944
+ - collection:
1945
+ id: &collection collection
1946
+ database: *database
1947
+ collectionName: *collectionName
1948
+ - bucket:
1949
+ id: &bucket bucket
1950
+ database: *database
1951
+ - session:
1952
+ id: &session session
1953
+ client: *client
1954
+ - name: find
1955
+ object: *collection
1956
+ arguments:
1957
+ timeoutMS: 100000
1958
+ filter: {}
1959
+
1960
+
1961
+ expectEvents:
1962
+ - client: *client
1963
+ events:
1964
+ - commandStartedEvent:
1965
+ commandName: find
1966
+ databaseName: *databaseName
1967
+ command:
1968
+ find: *collectionName
1969
+ writeConcern: { $$exists: false }
1970
+ maxTimeMS: { $$type: ["int", "long"] }
1971
+
1972
+ - description: "maxTimeMS is ignored if timeoutMS is set - find on collection"
1973
+ operations:
1974
+ - name: createEntities
1975
+ object: testRunner
1976
+ arguments:
1977
+ entities:
1978
+ - client:
1979
+ id: &client client
1980
+ useMultipleMongoses: false
1981
+ observeEvents:
1982
+ - commandStartedEvent
1983
+ ignoreCommandMonitoringEvents:
1984
+ - killCursors
1985
+ - database:
1986
+ id: &database database
1987
+ client: *client
1988
+ databaseName: *databaseName
1989
+ - collection:
1990
+ id: &collection collection
1991
+ database: *database
1992
+ collectionName: *collectionName
1993
+ - bucket:
1994
+ id: &bucket bucket
1995
+ database: *database
1996
+ - session:
1997
+ id: &session session
1998
+ client: *client
1999
+ - name: find
2000
+ object: *collection
2001
+ arguments:
2002
+ timeoutMS: &timeoutMS 1000
2003
+ maxTimeMS: 5000
2004
+ filter: {}
2005
+
2006
+
2007
+ expectEvents:
2008
+ - client: *client
2009
+ events:
2010
+ - commandStartedEvent:
2011
+ commandName: find
2012
+ databaseName: *databaseName
2013
+ command:
2014
+ find: *collectionName
2015
+ maxTimeMS: { $$lte: *timeoutMS }
2016
+
2017
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - findOne on collection"
2018
+ operations:
2019
+ - name: createEntities
2020
+ object: testRunner
2021
+ arguments:
2022
+ entities:
2023
+ - client:
2024
+ id: &client client
2025
+ uriOptions:
2026
+ socketTimeoutMS: 1
2027
+ useMultipleMongoses: false
2028
+ - database:
2029
+ id: &database database
2030
+ client: *client
2031
+ databaseName: *databaseName
2032
+ - collection:
2033
+ id: &collection collection
2034
+ database: *database
2035
+ collectionName: *collectionName
2036
+ - bucket:
2037
+ id: &bucket bucket
2038
+ database: *database
2039
+ - session:
2040
+ id: &session session
2041
+ client: *client
2042
+ - name: failPoint
2043
+ object: testRunner
2044
+ arguments:
2045
+ client: *failPointClient
2046
+ failPoint:
2047
+ configureFailPoint: failCommand
2048
+ mode: { times: 1 }
2049
+ data:
2050
+ failCommands: ["find"]
2051
+ blockConnection: true
2052
+ blockTimeMS: 5
2053
+ - name: findOne
2054
+ object: *collection
2055
+ arguments:
2056
+ timeoutMS: 100000
2057
+ filter: {}
2058
+
2059
+
2060
+
2061
+ - description: "wTimeoutMS is ignored if timeoutMS is set - findOne on collection"
2062
+ operations:
2063
+ - name: createEntities
2064
+ object: testRunner
2065
+ arguments:
2066
+ entities:
2067
+ - client:
2068
+ id: &client client
2069
+ uriOptions:
2070
+ wTimeoutMS: 1
2071
+ observeEvents:
2072
+ - commandStartedEvent
2073
+ ignoreCommandMonitoringEvents:
2074
+ - killCursors
2075
+ - database:
2076
+ id: &database database
2077
+ client: *client
2078
+ databaseName: *databaseName
2079
+ - collection:
2080
+ id: &collection collection
2081
+ database: *database
2082
+ collectionName: *collectionName
2083
+ - bucket:
2084
+ id: &bucket bucket
2085
+ database: *database
2086
+ - session:
2087
+ id: &session session
2088
+ client: *client
2089
+ - name: findOne
2090
+ object: *collection
2091
+ arguments:
2092
+ timeoutMS: 100000
2093
+ filter: {}
2094
+
2095
+
2096
+ expectEvents:
2097
+ - client: *client
2098
+ events:
2099
+ - commandStartedEvent:
2100
+ commandName: find
2101
+ databaseName: *databaseName
2102
+ command:
2103
+ find: *collectionName
2104
+ writeConcern: { $$exists: false }
2105
+ maxTimeMS: { $$type: ["int", "long"] }
2106
+
2107
+ - description: "maxTimeMS is ignored if timeoutMS is set - findOne on collection"
2108
+ operations:
2109
+ - name: createEntities
2110
+ object: testRunner
2111
+ arguments:
2112
+ entities:
2113
+ - client:
2114
+ id: &client client
2115
+ useMultipleMongoses: false
2116
+ observeEvents:
2117
+ - commandStartedEvent
2118
+ ignoreCommandMonitoringEvents:
2119
+ - killCursors
2120
+ - database:
2121
+ id: &database database
2122
+ client: *client
2123
+ databaseName: *databaseName
2124
+ - collection:
2125
+ id: &collection collection
2126
+ database: *database
2127
+ collectionName: *collectionName
2128
+ - bucket:
2129
+ id: &bucket bucket
2130
+ database: *database
2131
+ - session:
2132
+ id: &session session
2133
+ client: *client
2134
+ - name: findOne
2135
+ object: *collection
2136
+ arguments:
2137
+ timeoutMS: &timeoutMS 1000
2138
+ maxTimeMS: 5000
2139
+ filter: {}
2140
+
2141
+
2142
+ expectEvents:
2143
+ - client: *client
2144
+ events:
2145
+ - commandStartedEvent:
2146
+ commandName: find
2147
+ databaseName: *databaseName
2148
+ command:
2149
+ find: *collectionName
2150
+ maxTimeMS: { $$lte: *timeoutMS }
2151
+
2152
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - listIndexes on collection"
2153
+ operations:
2154
+ - name: createEntities
2155
+ object: testRunner
2156
+ arguments:
2157
+ entities:
2158
+ - client:
2159
+ id: &client client
2160
+ uriOptions:
2161
+ socketTimeoutMS: 1
2162
+ useMultipleMongoses: false
2163
+ - database:
2164
+ id: &database database
2165
+ client: *client
2166
+ databaseName: *databaseName
2167
+ - collection:
2168
+ id: &collection collection
2169
+ database: *database
2170
+ collectionName: *collectionName
2171
+ - bucket:
2172
+ id: &bucket bucket
2173
+ database: *database
2174
+ - session:
2175
+ id: &session session
2176
+ client: *client
2177
+ - name: failPoint
2178
+ object: testRunner
2179
+ arguments:
2180
+ client: *failPointClient
2181
+ failPoint:
2182
+ configureFailPoint: failCommand
2183
+ mode: { times: 1 }
2184
+ data:
2185
+ failCommands: ["listIndexes"]
2186
+ blockConnection: true
2187
+ blockTimeMS: 5
2188
+ - name: listIndexes
2189
+ object: *collection
2190
+ arguments:
2191
+ timeoutMS: 100000
2192
+
2193
+
2194
+
2195
+ - description: "wTimeoutMS is ignored if timeoutMS is set - listIndexes on collection"
2196
+ operations:
2197
+ - name: createEntities
2198
+ object: testRunner
2199
+ arguments:
2200
+ entities:
2201
+ - client:
2202
+ id: &client client
2203
+ uriOptions:
2204
+ wTimeoutMS: 1
2205
+ observeEvents:
2206
+ - commandStartedEvent
2207
+ ignoreCommandMonitoringEvents:
2208
+ - killCursors
2209
+ - database:
2210
+ id: &database database
2211
+ client: *client
2212
+ databaseName: *databaseName
2213
+ - collection:
2214
+ id: &collection collection
2215
+ database: *database
2216
+ collectionName: *collectionName
2217
+ - bucket:
2218
+ id: &bucket bucket
2219
+ database: *database
2220
+ - session:
2221
+ id: &session session
2222
+ client: *client
2223
+ - name: listIndexes
2224
+ object: *collection
2225
+ arguments:
2226
+ timeoutMS: 100000
2227
+
2228
+
2229
+ expectEvents:
2230
+ - client: *client
2231
+ events:
2232
+ - commandStartedEvent:
2233
+ commandName: listIndexes
2234
+ databaseName: *databaseName
2235
+ command:
2236
+ listIndexes: *collectionName
2237
+ writeConcern: { $$exists: false }
2238
+ maxTimeMS: { $$type: ["int", "long"] }
2239
+
2240
+
2241
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - listIndexNames on collection"
2242
+ operations:
2243
+ - name: createEntities
2244
+ object: testRunner
2245
+ arguments:
2246
+ entities:
2247
+ - client:
2248
+ id: &client client
2249
+ uriOptions:
2250
+ socketTimeoutMS: 1
2251
+ useMultipleMongoses: false
2252
+ - database:
2253
+ id: &database database
2254
+ client: *client
2255
+ databaseName: *databaseName
2256
+ - collection:
2257
+ id: &collection collection
2258
+ database: *database
2259
+ collectionName: *collectionName
2260
+ - bucket:
2261
+ id: &bucket bucket
2262
+ database: *database
2263
+ - session:
2264
+ id: &session session
2265
+ client: *client
2266
+ - name: failPoint
2267
+ object: testRunner
2268
+ arguments:
2269
+ client: *failPointClient
2270
+ failPoint:
2271
+ configureFailPoint: failCommand
2272
+ mode: { times: 1 }
2273
+ data:
2274
+ failCommands: ["listIndexes"]
2275
+ blockConnection: true
2276
+ blockTimeMS: 5
2277
+ - name: listIndexNames
2278
+ object: *collection
2279
+ arguments:
2280
+ timeoutMS: 100000
2281
+
2282
+
2283
+
2284
+ - description: "wTimeoutMS is ignored if timeoutMS is set - listIndexNames on collection"
2285
+ operations:
2286
+ - name: createEntities
2287
+ object: testRunner
2288
+ arguments:
2289
+ entities:
2290
+ - client:
2291
+ id: &client client
2292
+ uriOptions:
2293
+ wTimeoutMS: 1
2294
+ observeEvents:
2295
+ - commandStartedEvent
2296
+ ignoreCommandMonitoringEvents:
2297
+ - killCursors
2298
+ - database:
2299
+ id: &database database
2300
+ client: *client
2301
+ databaseName: *databaseName
2302
+ - collection:
2303
+ id: &collection collection
2304
+ database: *database
2305
+ collectionName: *collectionName
2306
+ - bucket:
2307
+ id: &bucket bucket
2308
+ database: *database
2309
+ - session:
2310
+ id: &session session
2311
+ client: *client
2312
+ - name: listIndexNames
2313
+ object: *collection
2314
+ arguments:
2315
+ timeoutMS: 100000
2316
+
2317
+
2318
+ expectEvents:
2319
+ - client: *client
2320
+ events:
2321
+ - commandStartedEvent:
2322
+ commandName: listIndexes
2323
+ databaseName: *databaseName
2324
+ command:
2325
+ listIndexes: *collectionName
2326
+ writeConcern: { $$exists: false }
2327
+ maxTimeMS: { $$type: ["int", "long"] }
2328
+
2329
+
2330
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - createChangeStream on collection"
2331
+ operations:
2332
+ - name: createEntities
2333
+ object: testRunner
2334
+ arguments:
2335
+ entities:
2336
+ - client:
2337
+ id: &client client
2338
+ uriOptions:
2339
+ socketTimeoutMS: 1
2340
+ useMultipleMongoses: false
2341
+ - database:
2342
+ id: &database database
2343
+ client: *client
2344
+ databaseName: *databaseName
2345
+ - collection:
2346
+ id: &collection collection
2347
+ database: *database
2348
+ collectionName: *collectionName
2349
+ - bucket:
2350
+ id: &bucket bucket
2351
+ database: *database
2352
+ - session:
2353
+ id: &session session
2354
+ client: *client
2355
+ - name: failPoint
2356
+ object: testRunner
2357
+ arguments:
2358
+ client: *failPointClient
2359
+ failPoint:
2360
+ configureFailPoint: failCommand
2361
+ mode: { times: 1 }
2362
+ data:
2363
+ failCommands: ["aggregate"]
2364
+ blockConnection: true
2365
+ blockTimeMS: 5
2366
+ - name: createChangeStream
2367
+ object: *collection
2368
+ arguments:
2369
+ timeoutMS: 100000
2370
+ pipeline: []
2371
+
2372
+
2373
+
2374
+ - description: "wTimeoutMS is ignored if timeoutMS is set - createChangeStream on collection"
2375
+ operations:
2376
+ - name: createEntities
2377
+ object: testRunner
2378
+ arguments:
2379
+ entities:
2380
+ - client:
2381
+ id: &client client
2382
+ uriOptions:
2383
+ wTimeoutMS: 1
2384
+ observeEvents:
2385
+ - commandStartedEvent
2386
+ ignoreCommandMonitoringEvents:
2387
+ - killCursors
2388
+ - database:
2389
+ id: &database database
2390
+ client: *client
2391
+ databaseName: *databaseName
2392
+ - collection:
2393
+ id: &collection collection
2394
+ database: *database
2395
+ collectionName: *collectionName
2396
+ - bucket:
2397
+ id: &bucket bucket
2398
+ database: *database
2399
+ - session:
2400
+ id: &session session
2401
+ client: *client
2402
+ - name: createChangeStream
2403
+ object: *collection
2404
+ arguments:
2405
+ timeoutMS: 100000
2406
+ pipeline: []
2407
+
2408
+
2409
+ expectEvents:
2410
+ - client: *client
2411
+ events:
2412
+ - commandStartedEvent:
2413
+ commandName: aggregate
2414
+ databaseName: *databaseName
2415
+ command:
2416
+ aggregate: *collectionName
2417
+ writeConcern: { $$exists: false }
2418
+ maxTimeMS: { $$type: ["int", "long"] }
2419
+
2420
+
2421
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - insertOne on collection"
2422
+ operations:
2423
+ - name: createEntities
2424
+ object: testRunner
2425
+ arguments:
2426
+ entities:
2427
+ - client:
2428
+ id: &client client
2429
+ uriOptions:
2430
+ socketTimeoutMS: 1
2431
+ useMultipleMongoses: false
2432
+ - database:
2433
+ id: &database database
2434
+ client: *client
2435
+ databaseName: *databaseName
2436
+ - collection:
2437
+ id: &collection collection
2438
+ database: *database
2439
+ collectionName: *collectionName
2440
+ - bucket:
2441
+ id: &bucket bucket
2442
+ database: *database
2443
+ - session:
2444
+ id: &session session
2445
+ client: *client
2446
+ - name: failPoint
2447
+ object: testRunner
2448
+ arguments:
2449
+ client: *failPointClient
2450
+ failPoint:
2451
+ configureFailPoint: failCommand
2452
+ mode: { times: 1 }
2453
+ data:
2454
+ failCommands: ["insert"]
2455
+ blockConnection: true
2456
+ blockTimeMS: 5
2457
+ - name: insertOne
2458
+ object: *collection
2459
+ arguments:
2460
+ timeoutMS: 100000
2461
+ document: { x: 1 }
2462
+
2463
+
2464
+
2465
+ - description: "wTimeoutMS is ignored if timeoutMS is set - insertOne on collection"
2466
+ operations:
2467
+ - name: createEntities
2468
+ object: testRunner
2469
+ arguments:
2470
+ entities:
2471
+ - client:
2472
+ id: &client client
2473
+ uriOptions:
2474
+ wTimeoutMS: 1
2475
+ observeEvents:
2476
+ - commandStartedEvent
2477
+ ignoreCommandMonitoringEvents:
2478
+ - killCursors
2479
+ - database:
2480
+ id: &database database
2481
+ client: *client
2482
+ databaseName: *databaseName
2483
+ - collection:
2484
+ id: &collection collection
2485
+ database: *database
2486
+ collectionName: *collectionName
2487
+ - bucket:
2488
+ id: &bucket bucket
2489
+ database: *database
2490
+ - session:
2491
+ id: &session session
2492
+ client: *client
2493
+ - name: insertOne
2494
+ object: *collection
2495
+ arguments:
2496
+ timeoutMS: 100000
2497
+ document: { x: 1 }
2498
+
2499
+
2500
+ expectEvents:
2501
+ - client: *client
2502
+ events:
2503
+ - commandStartedEvent:
2504
+ commandName: insert
2505
+ databaseName: *databaseName
2506
+ command:
2507
+ insert: *collectionName
2508
+ writeConcern: { $$exists: false }
2509
+ maxTimeMS: { $$type: ["int", "long"] }
2510
+
2511
+
2512
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - insertMany on collection"
2513
+ operations:
2514
+ - name: createEntities
2515
+ object: testRunner
2516
+ arguments:
2517
+ entities:
2518
+ - client:
2519
+ id: &client client
2520
+ uriOptions:
2521
+ socketTimeoutMS: 1
2522
+ useMultipleMongoses: false
2523
+ - database:
2524
+ id: &database database
2525
+ client: *client
2526
+ databaseName: *databaseName
2527
+ - collection:
2528
+ id: &collection collection
2529
+ database: *database
2530
+ collectionName: *collectionName
2531
+ - bucket:
2532
+ id: &bucket bucket
2533
+ database: *database
2534
+ - session:
2535
+ id: &session session
2536
+ client: *client
2537
+ - name: failPoint
2538
+ object: testRunner
2539
+ arguments:
2540
+ client: *failPointClient
2541
+ failPoint:
2542
+ configureFailPoint: failCommand
2543
+ mode: { times: 1 }
2544
+ data:
2545
+ failCommands: ["insert"]
2546
+ blockConnection: true
2547
+ blockTimeMS: 5
2548
+ - name: insertMany
2549
+ object: *collection
2550
+ arguments:
2551
+ timeoutMS: 100000
2552
+ documents:
2553
+ - { x: 1 }
2554
+
2555
+
2556
+
2557
+ - description: "wTimeoutMS is ignored if timeoutMS is set - insertMany on collection"
2558
+ operations:
2559
+ - name: createEntities
2560
+ object: testRunner
2561
+ arguments:
2562
+ entities:
2563
+ - client:
2564
+ id: &client client
2565
+ uriOptions:
2566
+ wTimeoutMS: 1
2567
+ observeEvents:
2568
+ - commandStartedEvent
2569
+ ignoreCommandMonitoringEvents:
2570
+ - killCursors
2571
+ - database:
2572
+ id: &database database
2573
+ client: *client
2574
+ databaseName: *databaseName
2575
+ - collection:
2576
+ id: &collection collection
2577
+ database: *database
2578
+ collectionName: *collectionName
2579
+ - bucket:
2580
+ id: &bucket bucket
2581
+ database: *database
2582
+ - session:
2583
+ id: &session session
2584
+ client: *client
2585
+ - name: insertMany
2586
+ object: *collection
2587
+ arguments:
2588
+ timeoutMS: 100000
2589
+ documents:
2590
+ - { x: 1 }
2591
+
2592
+
2593
+ expectEvents:
2594
+ - client: *client
2595
+ events:
2596
+ - commandStartedEvent:
2597
+ commandName: insert
2598
+ databaseName: *databaseName
2599
+ command:
2600
+ insert: *collectionName
2601
+ writeConcern: { $$exists: false }
2602
+ maxTimeMS: { $$type: ["int", "long"] }
2603
+
2604
+
2605
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - deleteOne on collection"
2606
+ operations:
2607
+ - name: createEntities
2608
+ object: testRunner
2609
+ arguments:
2610
+ entities:
2611
+ - client:
2612
+ id: &client client
2613
+ uriOptions:
2614
+ socketTimeoutMS: 1
2615
+ useMultipleMongoses: false
2616
+ - database:
2617
+ id: &database database
2618
+ client: *client
2619
+ databaseName: *databaseName
2620
+ - collection:
2621
+ id: &collection collection
2622
+ database: *database
2623
+ collectionName: *collectionName
2624
+ - bucket:
2625
+ id: &bucket bucket
2626
+ database: *database
2627
+ - session:
2628
+ id: &session session
2629
+ client: *client
2630
+ - name: failPoint
2631
+ object: testRunner
2632
+ arguments:
2633
+ client: *failPointClient
2634
+ failPoint:
2635
+ configureFailPoint: failCommand
2636
+ mode: { times: 1 }
2637
+ data:
2638
+ failCommands: ["delete"]
2639
+ blockConnection: true
2640
+ blockTimeMS: 5
2641
+ - name: deleteOne
2642
+ object: *collection
2643
+ arguments:
2644
+ timeoutMS: 100000
2645
+ filter: {}
2646
+
2647
+
2648
+
2649
+ - description: "wTimeoutMS is ignored if timeoutMS is set - deleteOne on collection"
2650
+ operations:
2651
+ - name: createEntities
2652
+ object: testRunner
2653
+ arguments:
2654
+ entities:
2655
+ - client:
2656
+ id: &client client
2657
+ uriOptions:
2658
+ wTimeoutMS: 1
2659
+ observeEvents:
2660
+ - commandStartedEvent
2661
+ ignoreCommandMonitoringEvents:
2662
+ - killCursors
2663
+ - database:
2664
+ id: &database database
2665
+ client: *client
2666
+ databaseName: *databaseName
2667
+ - collection:
2668
+ id: &collection collection
2669
+ database: *database
2670
+ collectionName: *collectionName
2671
+ - bucket:
2672
+ id: &bucket bucket
2673
+ database: *database
2674
+ - session:
2675
+ id: &session session
2676
+ client: *client
2677
+ - name: deleteOne
2678
+ object: *collection
2679
+ arguments:
2680
+ timeoutMS: 100000
2681
+ filter: {}
2682
+
2683
+
2684
+ expectEvents:
2685
+ - client: *client
2686
+ events:
2687
+ - commandStartedEvent:
2688
+ commandName: delete
2689
+ databaseName: *databaseName
2690
+ command:
2691
+ delete: *collectionName
2692
+ writeConcern: { $$exists: false }
2693
+ maxTimeMS: { $$type: ["int", "long"] }
2694
+
2695
+
2696
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - deleteMany on collection"
2697
+ operations:
2698
+ - name: createEntities
2699
+ object: testRunner
2700
+ arguments:
2701
+ entities:
2702
+ - client:
2703
+ id: &client client
2704
+ uriOptions:
2705
+ socketTimeoutMS: 1
2706
+ useMultipleMongoses: false
2707
+ - database:
2708
+ id: &database database
2709
+ client: *client
2710
+ databaseName: *databaseName
2711
+ - collection:
2712
+ id: &collection collection
2713
+ database: *database
2714
+ collectionName: *collectionName
2715
+ - bucket:
2716
+ id: &bucket bucket
2717
+ database: *database
2718
+ - session:
2719
+ id: &session session
2720
+ client: *client
2721
+ - name: failPoint
2722
+ object: testRunner
2723
+ arguments:
2724
+ client: *failPointClient
2725
+ failPoint:
2726
+ configureFailPoint: failCommand
2727
+ mode: { times: 1 }
2728
+ data:
2729
+ failCommands: ["delete"]
2730
+ blockConnection: true
2731
+ blockTimeMS: 5
2732
+ - name: deleteMany
2733
+ object: *collection
2734
+ arguments:
2735
+ timeoutMS: 100000
2736
+ filter: {}
2737
+
2738
+
2739
+
2740
+ - description: "wTimeoutMS is ignored if timeoutMS is set - deleteMany on collection"
2741
+ operations:
2742
+ - name: createEntities
2743
+ object: testRunner
2744
+ arguments:
2745
+ entities:
2746
+ - client:
2747
+ id: &client client
2748
+ uriOptions:
2749
+ wTimeoutMS: 1
2750
+ observeEvents:
2751
+ - commandStartedEvent
2752
+ ignoreCommandMonitoringEvents:
2753
+ - killCursors
2754
+ - database:
2755
+ id: &database database
2756
+ client: *client
2757
+ databaseName: *databaseName
2758
+ - collection:
2759
+ id: &collection collection
2760
+ database: *database
2761
+ collectionName: *collectionName
2762
+ - bucket:
2763
+ id: &bucket bucket
2764
+ database: *database
2765
+ - session:
2766
+ id: &session session
2767
+ client: *client
2768
+ - name: deleteMany
2769
+ object: *collection
2770
+ arguments:
2771
+ timeoutMS: 100000
2772
+ filter: {}
2773
+
2774
+
2775
+ expectEvents:
2776
+ - client: *client
2777
+ events:
2778
+ - commandStartedEvent:
2779
+ commandName: delete
2780
+ databaseName: *databaseName
2781
+ command:
2782
+ delete: *collectionName
2783
+ writeConcern: { $$exists: false }
2784
+ maxTimeMS: { $$type: ["int", "long"] }
2785
+
2786
+
2787
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - replaceOne on collection"
2788
+ operations:
2789
+ - name: createEntities
2790
+ object: testRunner
2791
+ arguments:
2792
+ entities:
2793
+ - client:
2794
+ id: &client client
2795
+ uriOptions:
2796
+ socketTimeoutMS: 1
2797
+ useMultipleMongoses: false
2798
+ - database:
2799
+ id: &database database
2800
+ client: *client
2801
+ databaseName: *databaseName
2802
+ - collection:
2803
+ id: &collection collection
2804
+ database: *database
2805
+ collectionName: *collectionName
2806
+ - bucket:
2807
+ id: &bucket bucket
2808
+ database: *database
2809
+ - session:
2810
+ id: &session session
2811
+ client: *client
2812
+ - name: failPoint
2813
+ object: testRunner
2814
+ arguments:
2815
+ client: *failPointClient
2816
+ failPoint:
2817
+ configureFailPoint: failCommand
2818
+ mode: { times: 1 }
2819
+ data:
2820
+ failCommands: ["update"]
2821
+ blockConnection: true
2822
+ blockTimeMS: 5
2823
+ - name: replaceOne
2824
+ object: *collection
2825
+ arguments:
2826
+ timeoutMS: 100000
2827
+ filter: {}
2828
+ replacement: { x: 1 }
2829
+
2830
+
2831
+
2832
+ - description: "wTimeoutMS is ignored if timeoutMS is set - replaceOne on collection"
2833
+ operations:
2834
+ - name: createEntities
2835
+ object: testRunner
2836
+ arguments:
2837
+ entities:
2838
+ - client:
2839
+ id: &client client
2840
+ uriOptions:
2841
+ wTimeoutMS: 1
2842
+ observeEvents:
2843
+ - commandStartedEvent
2844
+ ignoreCommandMonitoringEvents:
2845
+ - killCursors
2846
+ - database:
2847
+ id: &database database
2848
+ client: *client
2849
+ databaseName: *databaseName
2850
+ - collection:
2851
+ id: &collection collection
2852
+ database: *database
2853
+ collectionName: *collectionName
2854
+ - bucket:
2855
+ id: &bucket bucket
2856
+ database: *database
2857
+ - session:
2858
+ id: &session session
2859
+ client: *client
2860
+ - name: replaceOne
2861
+ object: *collection
2862
+ arguments:
2863
+ timeoutMS: 100000
2864
+ filter: {}
2865
+ replacement: { x: 1 }
2866
+
2867
+
2868
+ expectEvents:
2869
+ - client: *client
2870
+ events:
2871
+ - commandStartedEvent:
2872
+ commandName: update
2873
+ databaseName: *databaseName
2874
+ command:
2875
+ update: *collectionName
2876
+ writeConcern: { $$exists: false }
2877
+ maxTimeMS: { $$type: ["int", "long"] }
2878
+
2879
+
2880
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - updateOne on collection"
2881
+ operations:
2882
+ - name: createEntities
2883
+ object: testRunner
2884
+ arguments:
2885
+ entities:
2886
+ - client:
2887
+ id: &client client
2888
+ uriOptions:
2889
+ socketTimeoutMS: 1
2890
+ useMultipleMongoses: false
2891
+ - database:
2892
+ id: &database database
2893
+ client: *client
2894
+ databaseName: *databaseName
2895
+ - collection:
2896
+ id: &collection collection
2897
+ database: *database
2898
+ collectionName: *collectionName
2899
+ - bucket:
2900
+ id: &bucket bucket
2901
+ database: *database
2902
+ - session:
2903
+ id: &session session
2904
+ client: *client
2905
+ - name: failPoint
2906
+ object: testRunner
2907
+ arguments:
2908
+ client: *failPointClient
2909
+ failPoint:
2910
+ configureFailPoint: failCommand
2911
+ mode: { times: 1 }
2912
+ data:
2913
+ failCommands: ["update"]
2914
+ blockConnection: true
2915
+ blockTimeMS: 5
2916
+ - name: updateOne
2917
+ object: *collection
2918
+ arguments:
2919
+ timeoutMS: 100000
2920
+ filter: {}
2921
+ update: { $set: { x: 1 } }
2922
+
2923
+
2924
+
2925
+ - description: "wTimeoutMS is ignored if timeoutMS is set - updateOne on collection"
2926
+ operations:
2927
+ - name: createEntities
2928
+ object: testRunner
2929
+ arguments:
2930
+ entities:
2931
+ - client:
2932
+ id: &client client
2933
+ uriOptions:
2934
+ wTimeoutMS: 1
2935
+ observeEvents:
2936
+ - commandStartedEvent
2937
+ ignoreCommandMonitoringEvents:
2938
+ - killCursors
2939
+ - database:
2940
+ id: &database database
2941
+ client: *client
2942
+ databaseName: *databaseName
2943
+ - collection:
2944
+ id: &collection collection
2945
+ database: *database
2946
+ collectionName: *collectionName
2947
+ - bucket:
2948
+ id: &bucket bucket
2949
+ database: *database
2950
+ - session:
2951
+ id: &session session
2952
+ client: *client
2953
+ - name: updateOne
2954
+ object: *collection
2955
+ arguments:
2956
+ timeoutMS: 100000
2957
+ filter: {}
2958
+ update: { $set: { x: 1 } }
2959
+
2960
+
2961
+ expectEvents:
2962
+ - client: *client
2963
+ events:
2964
+ - commandStartedEvent:
2965
+ commandName: update
2966
+ databaseName: *databaseName
2967
+ command:
2968
+ update: *collectionName
2969
+ writeConcern: { $$exists: false }
2970
+ maxTimeMS: { $$type: ["int", "long"] }
2971
+
2972
+
2973
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - updateMany on collection"
2974
+ operations:
2975
+ - name: createEntities
2976
+ object: testRunner
2977
+ arguments:
2978
+ entities:
2979
+ - client:
2980
+ id: &client client
2981
+ uriOptions:
2982
+ socketTimeoutMS: 1
2983
+ useMultipleMongoses: false
2984
+ - database:
2985
+ id: &database database
2986
+ client: *client
2987
+ databaseName: *databaseName
2988
+ - collection:
2989
+ id: &collection collection
2990
+ database: *database
2991
+ collectionName: *collectionName
2992
+ - bucket:
2993
+ id: &bucket bucket
2994
+ database: *database
2995
+ - session:
2996
+ id: &session session
2997
+ client: *client
2998
+ - name: failPoint
2999
+ object: testRunner
3000
+ arguments:
3001
+ client: *failPointClient
3002
+ failPoint:
3003
+ configureFailPoint: failCommand
3004
+ mode: { times: 1 }
3005
+ data:
3006
+ failCommands: ["update"]
3007
+ blockConnection: true
3008
+ blockTimeMS: 5
3009
+ - name: updateMany
3010
+ object: *collection
3011
+ arguments:
3012
+ timeoutMS: 100000
3013
+ filter: {}
3014
+ update: { $set: { x: 1 } }
3015
+
3016
+
3017
+
3018
+ - description: "wTimeoutMS is ignored if timeoutMS is set - updateMany on collection"
3019
+ operations:
3020
+ - name: createEntities
3021
+ object: testRunner
3022
+ arguments:
3023
+ entities:
3024
+ - client:
3025
+ id: &client client
3026
+ uriOptions:
3027
+ wTimeoutMS: 1
3028
+ observeEvents:
3029
+ - commandStartedEvent
3030
+ ignoreCommandMonitoringEvents:
3031
+ - killCursors
3032
+ - database:
3033
+ id: &database database
3034
+ client: *client
3035
+ databaseName: *databaseName
3036
+ - collection:
3037
+ id: &collection collection
3038
+ database: *database
3039
+ collectionName: *collectionName
3040
+ - bucket:
3041
+ id: &bucket bucket
3042
+ database: *database
3043
+ - session:
3044
+ id: &session session
3045
+ client: *client
3046
+ - name: updateMany
3047
+ object: *collection
3048
+ arguments:
3049
+ timeoutMS: 100000
3050
+ filter: {}
3051
+ update: { $set: { x: 1 } }
3052
+
3053
+
3054
+ expectEvents:
3055
+ - client: *client
3056
+ events:
3057
+ - commandStartedEvent:
3058
+ commandName: update
3059
+ databaseName: *databaseName
3060
+ command:
3061
+ update: *collectionName
3062
+ writeConcern: { $$exists: false }
3063
+ maxTimeMS: { $$type: ["int", "long"] }
3064
+
3065
+
3066
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - findOneAndDelete on collection"
3067
+ operations:
3068
+ - name: createEntities
3069
+ object: testRunner
3070
+ arguments:
3071
+ entities:
3072
+ - client:
3073
+ id: &client client
3074
+ uriOptions:
3075
+ socketTimeoutMS: 1
3076
+ useMultipleMongoses: false
3077
+ - database:
3078
+ id: &database database
3079
+ client: *client
3080
+ databaseName: *databaseName
3081
+ - collection:
3082
+ id: &collection collection
3083
+ database: *database
3084
+ collectionName: *collectionName
3085
+ - bucket:
3086
+ id: &bucket bucket
3087
+ database: *database
3088
+ - session:
3089
+ id: &session session
3090
+ client: *client
3091
+ - name: failPoint
3092
+ object: testRunner
3093
+ arguments:
3094
+ client: *failPointClient
3095
+ failPoint:
3096
+ configureFailPoint: failCommand
3097
+ mode: { times: 1 }
3098
+ data:
3099
+ failCommands: ["findAndModify"]
3100
+ blockConnection: true
3101
+ blockTimeMS: 5
3102
+ - name: findOneAndDelete
3103
+ object: *collection
3104
+ arguments:
3105
+ timeoutMS: 100000
3106
+ filter: {}
3107
+
3108
+
3109
+
3110
+ - description: "wTimeoutMS is ignored if timeoutMS is set - findOneAndDelete on collection"
3111
+ operations:
3112
+ - name: createEntities
3113
+ object: testRunner
3114
+ arguments:
3115
+ entities:
3116
+ - client:
3117
+ id: &client client
3118
+ uriOptions:
3119
+ wTimeoutMS: 1
3120
+ observeEvents:
3121
+ - commandStartedEvent
3122
+ ignoreCommandMonitoringEvents:
3123
+ - killCursors
3124
+ - database:
3125
+ id: &database database
3126
+ client: *client
3127
+ databaseName: *databaseName
3128
+ - collection:
3129
+ id: &collection collection
3130
+ database: *database
3131
+ collectionName: *collectionName
3132
+ - bucket:
3133
+ id: &bucket bucket
3134
+ database: *database
3135
+ - session:
3136
+ id: &session session
3137
+ client: *client
3138
+ - name: findOneAndDelete
3139
+ object: *collection
3140
+ arguments:
3141
+ timeoutMS: 100000
3142
+ filter: {}
3143
+
3144
+
3145
+ expectEvents:
3146
+ - client: *client
3147
+ events:
3148
+ - commandStartedEvent:
3149
+ commandName: findAndModify
3150
+ databaseName: *databaseName
3151
+ command:
3152
+ findAndModify: *collectionName
3153
+ writeConcern: { $$exists: false }
3154
+ maxTimeMS: { $$type: ["int", "long"] }
3155
+
3156
+ - description: "maxTimeMS is ignored if timeoutMS is set - findOneAndDelete on collection"
3157
+ operations:
3158
+ - name: createEntities
3159
+ object: testRunner
3160
+ arguments:
3161
+ entities:
3162
+ - client:
3163
+ id: &client client
3164
+ useMultipleMongoses: false
3165
+ observeEvents:
3166
+ - commandStartedEvent
3167
+ ignoreCommandMonitoringEvents:
3168
+ - killCursors
3169
+ - database:
3170
+ id: &database database
3171
+ client: *client
3172
+ databaseName: *databaseName
3173
+ - collection:
3174
+ id: &collection collection
3175
+ database: *database
3176
+ collectionName: *collectionName
3177
+ - bucket:
3178
+ id: &bucket bucket
3179
+ database: *database
3180
+ - session:
3181
+ id: &session session
3182
+ client: *client
3183
+ - name: findOneAndDelete
3184
+ object: *collection
3185
+ arguments:
3186
+ timeoutMS: &timeoutMS 1000
3187
+ maxTimeMS: 5000
3188
+ filter: {}
3189
+
3190
+
3191
+ expectEvents:
3192
+ - client: *client
3193
+ events:
3194
+ - commandStartedEvent:
3195
+ commandName: findAndModify
3196
+ databaseName: *databaseName
3197
+ command:
3198
+ findAndModify: *collectionName
3199
+ maxTimeMS: { $$lte: *timeoutMS }
3200
+
3201
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - findOneAndReplace on collection"
3202
+ operations:
3203
+ - name: createEntities
3204
+ object: testRunner
3205
+ arguments:
3206
+ entities:
3207
+ - client:
3208
+ id: &client client
3209
+ uriOptions:
3210
+ socketTimeoutMS: 1
3211
+ useMultipleMongoses: false
3212
+ - database:
3213
+ id: &database database
3214
+ client: *client
3215
+ databaseName: *databaseName
3216
+ - collection:
3217
+ id: &collection collection
3218
+ database: *database
3219
+ collectionName: *collectionName
3220
+ - bucket:
3221
+ id: &bucket bucket
3222
+ database: *database
3223
+ - session:
3224
+ id: &session session
3225
+ client: *client
3226
+ - name: failPoint
3227
+ object: testRunner
3228
+ arguments:
3229
+ client: *failPointClient
3230
+ failPoint:
3231
+ configureFailPoint: failCommand
3232
+ mode: { times: 1 }
3233
+ data:
3234
+ failCommands: ["findAndModify"]
3235
+ blockConnection: true
3236
+ blockTimeMS: 5
3237
+ - name: findOneAndReplace
3238
+ object: *collection
3239
+ arguments:
3240
+ timeoutMS: 100000
3241
+ filter: {}
3242
+ replacement: { x: 1 }
3243
+
3244
+
3245
+
3246
+ - description: "wTimeoutMS is ignored if timeoutMS is set - findOneAndReplace on collection"
3247
+ operations:
3248
+ - name: createEntities
3249
+ object: testRunner
3250
+ arguments:
3251
+ entities:
3252
+ - client:
3253
+ id: &client client
3254
+ uriOptions:
3255
+ wTimeoutMS: 1
3256
+ observeEvents:
3257
+ - commandStartedEvent
3258
+ ignoreCommandMonitoringEvents:
3259
+ - killCursors
3260
+ - database:
3261
+ id: &database database
3262
+ client: *client
3263
+ databaseName: *databaseName
3264
+ - collection:
3265
+ id: &collection collection
3266
+ database: *database
3267
+ collectionName: *collectionName
3268
+ - bucket:
3269
+ id: &bucket bucket
3270
+ database: *database
3271
+ - session:
3272
+ id: &session session
3273
+ client: *client
3274
+ - name: findOneAndReplace
3275
+ object: *collection
3276
+ arguments:
3277
+ timeoutMS: 100000
3278
+ filter: {}
3279
+ replacement: { x: 1 }
3280
+
3281
+
3282
+ expectEvents:
3283
+ - client: *client
3284
+ events:
3285
+ - commandStartedEvent:
3286
+ commandName: findAndModify
3287
+ databaseName: *databaseName
3288
+ command:
3289
+ findAndModify: *collectionName
3290
+ writeConcern: { $$exists: false }
3291
+ maxTimeMS: { $$type: ["int", "long"] }
3292
+
3293
+ - description: "maxTimeMS is ignored if timeoutMS is set - findOneAndReplace on collection"
3294
+ operations:
3295
+ - name: createEntities
3296
+ object: testRunner
3297
+ arguments:
3298
+ entities:
3299
+ - client:
3300
+ id: &client client
3301
+ useMultipleMongoses: false
3302
+ observeEvents:
3303
+ - commandStartedEvent
3304
+ ignoreCommandMonitoringEvents:
3305
+ - killCursors
3306
+ - database:
3307
+ id: &database database
3308
+ client: *client
3309
+ databaseName: *databaseName
3310
+ - collection:
3311
+ id: &collection collection
3312
+ database: *database
3313
+ collectionName: *collectionName
3314
+ - bucket:
3315
+ id: &bucket bucket
3316
+ database: *database
3317
+ - session:
3318
+ id: &session session
3319
+ client: *client
3320
+ - name: findOneAndReplace
3321
+ object: *collection
3322
+ arguments:
3323
+ timeoutMS: &timeoutMS 1000
3324
+ maxTimeMS: 5000
3325
+ filter: {}
3326
+ replacement: { x: 1 }
3327
+
3328
+
3329
+ expectEvents:
3330
+ - client: *client
3331
+ events:
3332
+ - commandStartedEvent:
3333
+ commandName: findAndModify
3334
+ databaseName: *databaseName
3335
+ command:
3336
+ findAndModify: *collectionName
3337
+ maxTimeMS: { $$lte: *timeoutMS }
3338
+
3339
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - findOneAndUpdate on collection"
3340
+ operations:
3341
+ - name: createEntities
3342
+ object: testRunner
3343
+ arguments:
3344
+ entities:
3345
+ - client:
3346
+ id: &client client
3347
+ uriOptions:
3348
+ socketTimeoutMS: 1
3349
+ useMultipleMongoses: false
3350
+ - database:
3351
+ id: &database database
3352
+ client: *client
3353
+ databaseName: *databaseName
3354
+ - collection:
3355
+ id: &collection collection
3356
+ database: *database
3357
+ collectionName: *collectionName
3358
+ - bucket:
3359
+ id: &bucket bucket
3360
+ database: *database
3361
+ - session:
3362
+ id: &session session
3363
+ client: *client
3364
+ - name: failPoint
3365
+ object: testRunner
3366
+ arguments:
3367
+ client: *failPointClient
3368
+ failPoint:
3369
+ configureFailPoint: failCommand
3370
+ mode: { times: 1 }
3371
+ data:
3372
+ failCommands: ["findAndModify"]
3373
+ blockConnection: true
3374
+ blockTimeMS: 5
3375
+ - name: findOneAndUpdate
3376
+ object: *collection
3377
+ arguments:
3378
+ timeoutMS: 100000
3379
+ filter: {}
3380
+ update: { $set: { x: 1 } }
3381
+
3382
+
3383
+
3384
+ - description: "wTimeoutMS is ignored if timeoutMS is set - findOneAndUpdate on collection"
3385
+ operations:
3386
+ - name: createEntities
3387
+ object: testRunner
3388
+ arguments:
3389
+ entities:
3390
+ - client:
3391
+ id: &client client
3392
+ uriOptions:
3393
+ wTimeoutMS: 1
3394
+ observeEvents:
3395
+ - commandStartedEvent
3396
+ ignoreCommandMonitoringEvents:
3397
+ - killCursors
3398
+ - database:
3399
+ id: &database database
3400
+ client: *client
3401
+ databaseName: *databaseName
3402
+ - collection:
3403
+ id: &collection collection
3404
+ database: *database
3405
+ collectionName: *collectionName
3406
+ - bucket:
3407
+ id: &bucket bucket
3408
+ database: *database
3409
+ - session:
3410
+ id: &session session
3411
+ client: *client
3412
+ - name: findOneAndUpdate
3413
+ object: *collection
3414
+ arguments:
3415
+ timeoutMS: 100000
3416
+ filter: {}
3417
+ update: { $set: { x: 1 } }
3418
+
3419
+
3420
+ expectEvents:
3421
+ - client: *client
3422
+ events:
3423
+ - commandStartedEvent:
3424
+ commandName: findAndModify
3425
+ databaseName: *databaseName
3426
+ command:
3427
+ findAndModify: *collectionName
3428
+ writeConcern: { $$exists: false }
3429
+ maxTimeMS: { $$type: ["int", "long"] }
3430
+
3431
+ - description: "maxTimeMS is ignored if timeoutMS is set - findOneAndUpdate on collection"
3432
+ operations:
3433
+ - name: createEntities
3434
+ object: testRunner
3435
+ arguments:
3436
+ entities:
3437
+ - client:
3438
+ id: &client client
3439
+ useMultipleMongoses: false
3440
+ observeEvents:
3441
+ - commandStartedEvent
3442
+ ignoreCommandMonitoringEvents:
3443
+ - killCursors
3444
+ - database:
3445
+ id: &database database
3446
+ client: *client
3447
+ databaseName: *databaseName
3448
+ - collection:
3449
+ id: &collection collection
3450
+ database: *database
3451
+ collectionName: *collectionName
3452
+ - bucket:
3453
+ id: &bucket bucket
3454
+ database: *database
3455
+ - session:
3456
+ id: &session session
3457
+ client: *client
3458
+ - name: findOneAndUpdate
3459
+ object: *collection
3460
+ arguments:
3461
+ timeoutMS: &timeoutMS 1000
3462
+ maxTimeMS: 5000
3463
+ filter: {}
3464
+ update: { $set: { x: 1 } }
3465
+
3466
+
3467
+ expectEvents:
3468
+ - client: *client
3469
+ events:
3470
+ - commandStartedEvent:
3471
+ commandName: findAndModify
3472
+ databaseName: *databaseName
3473
+ command:
3474
+ findAndModify: *collectionName
3475
+ maxTimeMS: { $$lte: *timeoutMS }
3476
+
3477
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - bulkWrite on collection"
3478
+ operations:
3479
+ - name: createEntities
3480
+ object: testRunner
3481
+ arguments:
3482
+ entities:
3483
+ - client:
3484
+ id: &client client
3485
+ uriOptions:
3486
+ socketTimeoutMS: 1
3487
+ useMultipleMongoses: false
3488
+ - database:
3489
+ id: &database database
3490
+ client: *client
3491
+ databaseName: *databaseName
3492
+ - collection:
3493
+ id: &collection collection
3494
+ database: *database
3495
+ collectionName: *collectionName
3496
+ - bucket:
3497
+ id: &bucket bucket
3498
+ database: *database
3499
+ - session:
3500
+ id: &session session
3501
+ client: *client
3502
+ - name: failPoint
3503
+ object: testRunner
3504
+ arguments:
3505
+ client: *failPointClient
3506
+ failPoint:
3507
+ configureFailPoint: failCommand
3508
+ mode: { times: 1 }
3509
+ data:
3510
+ failCommands: ["insert"]
3511
+ blockConnection: true
3512
+ blockTimeMS: 5
3513
+ - name: bulkWrite
3514
+ object: *collection
3515
+ arguments:
3516
+ timeoutMS: 100000
3517
+ requests:
3518
+ - insertOne:
3519
+ document: { _id: 1 }
3520
+
3521
+
3522
+
3523
+ - description: "wTimeoutMS is ignored if timeoutMS is set - bulkWrite on collection"
3524
+ operations:
3525
+ - name: createEntities
3526
+ object: testRunner
3527
+ arguments:
3528
+ entities:
3529
+ - client:
3530
+ id: &client client
3531
+ uriOptions:
3532
+ wTimeoutMS: 1
3533
+ observeEvents:
3534
+ - commandStartedEvent
3535
+ ignoreCommandMonitoringEvents:
3536
+ - killCursors
3537
+ - database:
3538
+ id: &database database
3539
+ client: *client
3540
+ databaseName: *databaseName
3541
+ - collection:
3542
+ id: &collection collection
3543
+ database: *database
3544
+ collectionName: *collectionName
3545
+ - bucket:
3546
+ id: &bucket bucket
3547
+ database: *database
3548
+ - session:
3549
+ id: &session session
3550
+ client: *client
3551
+ - name: bulkWrite
3552
+ object: *collection
3553
+ arguments:
3554
+ timeoutMS: 100000
3555
+ requests:
3556
+ - insertOne:
3557
+ document: { _id: 1 }
3558
+
3559
+
3560
+ expectEvents:
3561
+ - client: *client
3562
+ events:
3563
+ - commandStartedEvent:
3564
+ commandName: insert
3565
+ databaseName: *databaseName
3566
+ command:
3567
+ insert: *collectionName
3568
+ writeConcern: { $$exists: false }
3569
+ maxTimeMS: { $$type: ["int", "long"] }
3570
+
3571
+
3572
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - createIndex on collection"
3573
+ operations:
3574
+ - name: createEntities
3575
+ object: testRunner
3576
+ arguments:
3577
+ entities:
3578
+ - client:
3579
+ id: &client client
3580
+ uriOptions:
3581
+ socketTimeoutMS: 1
3582
+ useMultipleMongoses: false
3583
+ - database:
3584
+ id: &database database
3585
+ client: *client
3586
+ databaseName: *databaseName
3587
+ - collection:
3588
+ id: &collection collection
3589
+ database: *database
3590
+ collectionName: *collectionName
3591
+ - bucket:
3592
+ id: &bucket bucket
3593
+ database: *database
3594
+ - session:
3595
+ id: &session session
3596
+ client: *client
3597
+ - name: failPoint
3598
+ object: testRunner
3599
+ arguments:
3600
+ client: *failPointClient
3601
+ failPoint:
3602
+ configureFailPoint: failCommand
3603
+ mode: { times: 1 }
3604
+ data:
3605
+ failCommands: ["createIndexes"]
3606
+ blockConnection: true
3607
+ blockTimeMS: 5
3608
+ - name: createIndex
3609
+ object: *collection
3610
+ arguments:
3611
+ timeoutMS: 100000
3612
+ keys: { x: 1 }
3613
+ name: "x_1"
3614
+
3615
+
3616
+
3617
+ - description: "wTimeoutMS is ignored if timeoutMS is set - createIndex on collection"
3618
+ operations:
3619
+ - name: createEntities
3620
+ object: testRunner
3621
+ arguments:
3622
+ entities:
3623
+ - client:
3624
+ id: &client client
3625
+ uriOptions:
3626
+ wTimeoutMS: 1
3627
+ observeEvents:
3628
+ - commandStartedEvent
3629
+ ignoreCommandMonitoringEvents:
3630
+ - killCursors
3631
+ - database:
3632
+ id: &database database
3633
+ client: *client
3634
+ databaseName: *databaseName
3635
+ - collection:
3636
+ id: &collection collection
3637
+ database: *database
3638
+ collectionName: *collectionName
3639
+ - bucket:
3640
+ id: &bucket bucket
3641
+ database: *database
3642
+ - session:
3643
+ id: &session session
3644
+ client: *client
3645
+ - name: createIndex
3646
+ object: *collection
3647
+ arguments:
3648
+ timeoutMS: 100000
3649
+ keys: { x: 1 }
3650
+ name: "x_1"
3651
+
3652
+
3653
+ expectEvents:
3654
+ - client: *client
3655
+ events:
3656
+ - commandStartedEvent:
3657
+ commandName: createIndexes
3658
+ databaseName: *databaseName
3659
+ command:
3660
+ createIndexes: *collectionName
3661
+ writeConcern: { $$exists: false }
3662
+ maxTimeMS: { $$type: ["int", "long"] }
3663
+
3664
+ - description: "maxTimeMS is ignored if timeoutMS is set - createIndex on collection"
3665
+ operations:
3666
+ - name: createEntities
3667
+ object: testRunner
3668
+ arguments:
3669
+ entities:
3670
+ - client:
3671
+ id: &client client
3672
+ useMultipleMongoses: false
3673
+ observeEvents:
3674
+ - commandStartedEvent
3675
+ ignoreCommandMonitoringEvents:
3676
+ - killCursors
3677
+ - database:
3678
+ id: &database database
3679
+ client: *client
3680
+ databaseName: *databaseName
3681
+ - collection:
3682
+ id: &collection collection
3683
+ database: *database
3684
+ collectionName: *collectionName
3685
+ - bucket:
3686
+ id: &bucket bucket
3687
+ database: *database
3688
+ - session:
3689
+ id: &session session
3690
+ client: *client
3691
+ - name: createIndex
3692
+ object: *collection
3693
+ arguments:
3694
+ timeoutMS: &timeoutMS 1000
3695
+ maxTimeMS: 5000
3696
+ keys: { x: 1 }
3697
+ name: "x_1"
3698
+
3699
+
3700
+ expectEvents:
3701
+ - client: *client
3702
+ events:
3703
+ - commandStartedEvent:
3704
+ commandName: createIndexes
3705
+ databaseName: *databaseName
3706
+ command:
3707
+ createIndexes: *collectionName
3708
+ maxTimeMS: { $$lte: *timeoutMS }
3709
+
3710
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - dropIndex on collection"
3711
+ operations:
3712
+ - name: createEntities
3713
+ object: testRunner
3714
+ arguments:
3715
+ entities:
3716
+ - client:
3717
+ id: &client client
3718
+ uriOptions:
3719
+ socketTimeoutMS: 1
3720
+ useMultipleMongoses: false
3721
+ - database:
3722
+ id: &database database
3723
+ client: *client
3724
+ databaseName: *databaseName
3725
+ - collection:
3726
+ id: &collection collection
3727
+ database: *database
3728
+ collectionName: *collectionName
3729
+ - bucket:
3730
+ id: &bucket bucket
3731
+ database: *database
3732
+ - session:
3733
+ id: &session session
3734
+ client: *client
3735
+ - name: failPoint
3736
+ object: testRunner
3737
+ arguments:
3738
+ client: *failPointClient
3739
+ failPoint:
3740
+ configureFailPoint: failCommand
3741
+ mode: { times: 1 }
3742
+ data:
3743
+ failCommands: ["dropIndexes"]
3744
+ blockConnection: true
3745
+ blockTimeMS: 5
3746
+ - name: dropIndex
3747
+ object: *collection
3748
+ arguments:
3749
+ timeoutMS: 100000
3750
+ name: "x_1"
3751
+
3752
+ expectError:
3753
+ isClientError: false
3754
+ isTimeoutError: false
3755
+
3756
+ - description: "wTimeoutMS is ignored if timeoutMS is set - dropIndex on collection"
3757
+ operations:
3758
+ - name: createEntities
3759
+ object: testRunner
3760
+ arguments:
3761
+ entities:
3762
+ - client:
3763
+ id: &client client
3764
+ uriOptions:
3765
+ wTimeoutMS: 1
3766
+ observeEvents:
3767
+ - commandStartedEvent
3768
+ ignoreCommandMonitoringEvents:
3769
+ - killCursors
3770
+ - database:
3771
+ id: &database database
3772
+ client: *client
3773
+ databaseName: *databaseName
3774
+ - collection:
3775
+ id: &collection collection
3776
+ database: *database
3777
+ collectionName: *collectionName
3778
+ - bucket:
3779
+ id: &bucket bucket
3780
+ database: *database
3781
+ - session:
3782
+ id: &session session
3783
+ client: *client
3784
+ - name: dropIndex
3785
+ object: *collection
3786
+ arguments:
3787
+ timeoutMS: 100000
3788
+ name: "x_1"
3789
+
3790
+ expectError:
3791
+ isClientError: false
3792
+ isTimeoutError: false
3793
+ expectEvents:
3794
+ - client: *client
3795
+ events:
3796
+ - commandStartedEvent:
3797
+ commandName: dropIndexes
3798
+ databaseName: *databaseName
3799
+ command:
3800
+ dropIndexes: *collectionName
3801
+ writeConcern: { $$exists: false }
3802
+ maxTimeMS: { $$type: ["int", "long"] }
3803
+
3804
+ - description: "maxTimeMS is ignored if timeoutMS is set - dropIndex on collection"
3805
+ operations:
3806
+ - name: createEntities
3807
+ object: testRunner
3808
+ arguments:
3809
+ entities:
3810
+ - client:
3811
+ id: &client client
3812
+ useMultipleMongoses: false
3813
+ observeEvents:
3814
+ - commandStartedEvent
3815
+ ignoreCommandMonitoringEvents:
3816
+ - killCursors
3817
+ - database:
3818
+ id: &database database
3819
+ client: *client
3820
+ databaseName: *databaseName
3821
+ - collection:
3822
+ id: &collection collection
3823
+ database: *database
3824
+ collectionName: *collectionName
3825
+ - bucket:
3826
+ id: &bucket bucket
3827
+ database: *database
3828
+ - session:
3829
+ id: &session session
3830
+ client: *client
3831
+ - name: dropIndex
3832
+ object: *collection
3833
+ arguments:
3834
+ timeoutMS: &timeoutMS 1000
3835
+ maxTimeMS: 5000
3836
+ name: "x_1"
3837
+
3838
+ expectError:
3839
+ isClientError: false
3840
+ isTimeoutError: false
3841
+ expectEvents:
3842
+ - client: *client
3843
+ events:
3844
+ - commandStartedEvent:
3845
+ commandName: dropIndexes
3846
+ databaseName: *databaseName
3847
+ command:
3848
+ dropIndexes: *collectionName
3849
+ maxTimeMS: { $$lte: *timeoutMS }
3850
+
3851
+ - description: "socketTimeoutMS is ignored if timeoutMS is set - dropIndexes on collection"
3852
+ operations:
3853
+ - name: createEntities
3854
+ object: testRunner
3855
+ arguments:
3856
+ entities:
3857
+ - client:
3858
+ id: &client client
3859
+ uriOptions:
3860
+ socketTimeoutMS: 1
3861
+ useMultipleMongoses: false
3862
+ - database:
3863
+ id: &database database
3864
+ client: *client
3865
+ databaseName: *databaseName
3866
+ - collection:
3867
+ id: &collection collection
3868
+ database: *database
3869
+ collectionName: *collectionName
3870
+ - bucket:
3871
+ id: &bucket bucket
3872
+ database: *database
3873
+ - session:
3874
+ id: &session session
3875
+ client: *client
3876
+ - name: failPoint
3877
+ object: testRunner
3878
+ arguments:
3879
+ client: *failPointClient
3880
+ failPoint:
3881
+ configureFailPoint: failCommand
3882
+ mode: { times: 1 }
3883
+ data:
3884
+ failCommands: ["dropIndexes"]
3885
+ blockConnection: true
3886
+ blockTimeMS: 5
3887
+ - name: dropIndexes
3888
+ object: *collection
3889
+ arguments:
3890
+ timeoutMS: 100000
3891
+
3892
+
3893
+
3894
+ - description: "wTimeoutMS is ignored if timeoutMS is set - dropIndexes on collection"
3895
+ operations:
3896
+ - name: createEntities
3897
+ object: testRunner
3898
+ arguments:
3899
+ entities:
3900
+ - client:
3901
+ id: &client client
3902
+ uriOptions:
3903
+ wTimeoutMS: 1
3904
+ observeEvents:
3905
+ - commandStartedEvent
3906
+ ignoreCommandMonitoringEvents:
3907
+ - killCursors
3908
+ - database:
3909
+ id: &database database
3910
+ client: *client
3911
+ databaseName: *databaseName
3912
+ - collection:
3913
+ id: &collection collection
3914
+ database: *database
3915
+ collectionName: *collectionName
3916
+ - bucket:
3917
+ id: &bucket bucket
3918
+ database: *database
3919
+ - session:
3920
+ id: &session session
3921
+ client: *client
3922
+ - name: dropIndexes
3923
+ object: *collection
3924
+ arguments:
3925
+ timeoutMS: 100000
3926
+
3927
+
3928
+ expectEvents:
3929
+ - client: *client
3930
+ events:
3931
+ - commandStartedEvent:
3932
+ commandName: dropIndexes
3933
+ databaseName: *databaseName
3934
+ command:
3935
+ dropIndexes: *collectionName
3936
+ writeConcern: { $$exists: false }
3937
+ maxTimeMS: { $$type: ["int", "long"] }
3938
+
3939
+ - description: "maxTimeMS is ignored if timeoutMS is set - dropIndexes on collection"
3940
+ operations:
3941
+ - name: createEntities
3942
+ object: testRunner
3943
+ arguments:
3944
+ entities:
3945
+ - client:
3946
+ id: &client client
3947
+ useMultipleMongoses: false
3948
+ observeEvents:
3949
+ - commandStartedEvent
3950
+ ignoreCommandMonitoringEvents:
3951
+ - killCursors
3952
+ - database:
3953
+ id: &database database
3954
+ client: *client
3955
+ databaseName: *databaseName
3956
+ - collection:
3957
+ id: &collection collection
3958
+ database: *database
3959
+ collectionName: *collectionName
3960
+ - bucket:
3961
+ id: &bucket bucket
3962
+ database: *database
3963
+ - session:
3964
+ id: &session session
3965
+ client: *client
3966
+ - name: dropIndexes
3967
+ object: *collection
3968
+ arguments:
3969
+ timeoutMS: &timeoutMS 1000
3970
+ maxTimeMS: 5000
3971
+
3972
+
3973
+ expectEvents:
3974
+ - client: *client
3975
+ events:
3976
+ - commandStartedEvent:
3977
+ commandName: dropIndexes
3978
+ databaseName: *databaseName
3979
+ command:
3980
+ dropIndexes: *collectionName
3981
+ maxTimeMS: { $$lte: *timeoutMS }
3982
+