mongo 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -1
  3. data/Rakefile +59 -23
  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/config.rb +2 -2
  25. data/lib/mongo/crypt/auto_encrypter.rb +4 -6
  26. data/lib/mongo/crypt/binding.rb +4 -4
  27. data/lib/mongo/crypt/context.rb +20 -14
  28. data/lib/mongo/crypt/encryption_io.rb +56 -26
  29. data/lib/mongo/crypt/explicit_encrypter.rb +49 -20
  30. data/lib/mongo/crypt/explicit_encryption_context.rb +17 -11
  31. data/lib/mongo/crypt/kms/azure/credentials_retriever.rb +22 -6
  32. data/lib/mongo/crypt/kms/gcp/credentials_retriever.rb +29 -4
  33. data/lib/mongo/csot_timeout_holder.rb +119 -0
  34. data/lib/mongo/cursor/kill_spec.rb +5 -2
  35. data/lib/mongo/cursor/nontailable.rb +27 -0
  36. data/lib/mongo/cursor.rb +86 -24
  37. data/lib/mongo/cursor_host.rb +82 -0
  38. data/lib/mongo/database/view.rb +81 -14
  39. data/lib/mongo/database.rb +88 -18
  40. data/lib/mongo/error/operation_failure.rb +209 -204
  41. data/lib/mongo/error/server_timeout_error.rb +12 -0
  42. data/lib/mongo/error/socket_timeout_error.rb +3 -1
  43. data/lib/mongo/error/timeout_error.rb +23 -0
  44. data/lib/mongo/error.rb +2 -0
  45. data/lib/mongo/grid/fs_bucket.rb +45 -12
  46. data/lib/mongo/grid/stream/read.rb +15 -1
  47. data/lib/mongo/grid/stream/write.rb +21 -4
  48. data/lib/mongo/index/view.rb +77 -16
  49. data/lib/mongo/operation/context.rb +40 -2
  50. data/lib/mongo/operation/create_search_indexes/op_msg.rb +2 -2
  51. data/lib/mongo/operation/delete/op_msg.rb +2 -1
  52. data/lib/mongo/operation/drop_search_index/op_msg.rb +2 -2
  53. data/lib/mongo/operation/find/op_msg.rb +45 -0
  54. data/lib/mongo/operation/get_more/op_msg.rb +33 -0
  55. data/lib/mongo/operation/insert/op_msg.rb +3 -2
  56. data/lib/mongo/operation/insert/result.rb +4 -2
  57. data/lib/mongo/operation/list_collections/result.rb +1 -1
  58. data/lib/mongo/operation/map_reduce/result.rb +1 -1
  59. data/lib/mongo/operation/op_msg_base.rb +3 -1
  60. data/lib/mongo/operation/result.rb +26 -5
  61. data/lib/mongo/operation/shared/executable.rb +12 -1
  62. data/lib/mongo/operation/shared/op_msg_executable.rb +4 -1
  63. data/lib/mongo/operation/shared/response_handling.rb +3 -3
  64. data/lib/mongo/operation/shared/sessions_supported.rb +1 -1
  65. data/lib/mongo/operation/shared/timed.rb +52 -0
  66. data/lib/mongo/operation/shared/write.rb +4 -1
  67. data/lib/mongo/operation/update/op_msg.rb +2 -1
  68. data/lib/mongo/operation/update_search_index/op_msg.rb +2 -2
  69. data/lib/mongo/operation.rb +1 -0
  70. data/lib/mongo/protocol/message.rb +1 -4
  71. data/lib/mongo/protocol/msg.rb +2 -2
  72. data/lib/mongo/retryable/base_worker.rb +28 -3
  73. data/lib/mongo/retryable/read_worker.rb +76 -35
  74. data/lib/mongo/retryable/write_worker.rb +53 -22
  75. data/lib/mongo/retryable.rb +8 -2
  76. data/lib/mongo/server/connection.rb +11 -5
  77. data/lib/mongo/server/connection_base.rb +22 -2
  78. data/lib/mongo/server/connection_pool.rb +32 -14
  79. data/lib/mongo/server/description/features.rb +1 -1
  80. data/lib/mongo/server/description.rb +18 -5
  81. data/lib/mongo/server/monitor.rb +7 -4
  82. data/lib/mongo/server/pending_connection.rb +25 -8
  83. data/lib/mongo/server/{round_trip_time_averager.rb → round_trip_time_calculator.rb} +25 -7
  84. data/lib/mongo/server.rb +11 -6
  85. data/lib/mongo/server_selector/base.rb +25 -9
  86. data/lib/mongo/session.rb +78 -9
  87. data/lib/mongo/socket/ssl.rb +131 -18
  88. data/lib/mongo/socket/tcp.rb +40 -6
  89. data/lib/mongo/socket.rb +154 -25
  90. data/lib/mongo/uri/options_mapper.rb +1 -0
  91. data/lib/mongo/version.rb +1 -5
  92. data/lib/mongo.rb +1 -0
  93. data/mongo.gemspec +8 -11
  94. data/spec/atlas/atlas_connectivity_spec.rb +4 -0
  95. data/spec/atlas/operations_spec.rb +4 -0
  96. data/spec/integration/client_side_encryption/auto_encryption_mongocryptd_spawn_spec.rb +2 -1
  97. data/spec/integration/client_side_encryption/auto_encryption_spec.rb +494 -487
  98. data/spec/integration/client_side_encryption/on_demand_aws_credentials_spec.rb +1 -1
  99. data/spec/integration/client_side_encryption/range_explicit_encryption_prose_spec.rb +67 -20
  100. data/spec/integration/client_side_operations_timeout/encryption_prose_spec.rb +131 -0
  101. data/spec/integration/connection_pool_populator_spec.rb +2 -0
  102. data/spec/integration/cursor_pinning_spec.rb +15 -60
  103. data/spec/integration/cursor_reaping_spec.rb +1 -1
  104. data/spec/integration/docs_examples_spec.rb +1 -1
  105. data/spec/integration/operation_failure_code_spec.rb +1 -1
  106. data/spec/integration/operation_failure_message_spec.rb +3 -3
  107. data/spec/integration/retryable_errors_spec.rb +2 -2
  108. data/spec/integration/retryable_reads_errors_spec.rb +35 -23
  109. data/spec/integration/sdam_error_handling_spec.rb +4 -1
  110. data/spec/integration/search_indexes_prose_spec.rb +4 -0
  111. data/spec/integration/server_spec.rb +4 -3
  112. data/spec/integration/transactions_api_examples_spec.rb +2 -0
  113. data/spec/kerberos/kerberos_spec.rb +4 -0
  114. data/spec/lite_spec_helper.rb +3 -11
  115. data/spec/mongo/auth/user/view_spec.rb +1 -1
  116. data/spec/mongo/caching_cursor_spec.rb +1 -1
  117. data/spec/mongo/client_encryption_spec.rb +1 -0
  118. data/spec/mongo/client_spec.rb +158 -4
  119. data/spec/mongo/collection/view/aggregation_spec.rb +14 -39
  120. data/spec/mongo/collection/view/change_stream_spec.rb +3 -3
  121. data/spec/mongo/collection_crud_spec.rb +1 -0
  122. data/spec/mongo/collection_spec.rb +5 -6
  123. data/spec/mongo/crypt/auto_encrypter_spec.rb +14 -12
  124. data/spec/mongo/crypt/data_key_context_spec.rb +3 -1
  125. data/spec/mongo/crypt/explicit_encryption_context_spec.rb +2 -2
  126. data/spec/mongo/crypt/handle_spec.rb +1 -1
  127. data/spec/mongo/cursor_spec.rb +26 -9
  128. data/spec/mongo/error/operation_failure_heavy_spec.rb +2 -2
  129. data/spec/mongo/operation/context_spec.rb +79 -0
  130. data/spec/mongo/operation/create/op_msg_spec.rb +106 -110
  131. data/spec/mongo/operation/delete/op_msg_spec.rb +6 -5
  132. data/spec/mongo/operation/find/op_msg_spec.rb +66 -0
  133. data/spec/mongo/operation/get_more/op_msg_spec.rb +65 -0
  134. data/spec/mongo/operation/insert/op_msg_spec.rb +128 -131
  135. data/spec/mongo/operation/shared/csot/examples.rb +113 -0
  136. data/spec/mongo/query_cache_spec.rb +243 -225
  137. data/spec/mongo/retryable_spec.rb +1 -0
  138. data/spec/mongo/server/connection_spec.rb +22 -0
  139. data/spec/mongo/server/round_trip_time_calculator_spec.rb +120 -0
  140. data/spec/mongo/socket/ssl_spec.rb +0 -10
  141. data/spec/runners/change_streams/test.rb +2 -2
  142. data/spec/runners/crud/operation.rb +1 -1
  143. data/spec/runners/crud/verifier.rb +3 -1
  144. data/spec/runners/transactions/operation.rb +4 -6
  145. data/spec/runners/unified/ambiguous_operations.rb +13 -0
  146. data/spec/runners/unified/assertions.rb +4 -0
  147. data/spec/runners/unified/change_stream_operations.rb +14 -24
  148. data/spec/runners/unified/crud_operations.rb +82 -59
  149. data/spec/runners/unified/ddl_operations.rb +38 -7
  150. data/spec/runners/unified/grid_fs_operations.rb +37 -2
  151. data/spec/runners/unified/support_operations.rb +43 -4
  152. data/spec/runners/unified/test.rb +22 -10
  153. data/spec/runners/unified.rb +1 -1
  154. data/spec/solo/clean_exit_spec.rb +2 -0
  155. data/spec/spec_tests/client_side_operations_timeout_spec.rb +15 -0
  156. data/spec/spec_tests/data/change_streams_unified/change-streams-clusterTime.yml +3 -1
  157. data/spec/spec_tests/data/change_streams_unified/change-streams-disambiguatedPaths.yml +3 -1
  158. data/spec/spec_tests/data/change_streams_unified/change-streams-errors.yml +3 -1
  159. data/spec/spec_tests/data/change_streams_unified/change-streams-pre_and_post_images.yml +1 -1
  160. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-allowlist.yml +1 -1
  161. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-errorLabels.yml +1 -1
  162. data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +1 -1
  163. data/spec/spec_tests/data/client_side_encryption/badQueries.yml +2 -1
  164. data/spec/spec_tests/data/client_side_encryption/fle2v2-BypassQueryAnalysis.yml +1 -0
  165. data/spec/spec_tests/data/client_side_encryption/fle2v2-Compact.yml +1 -0
  166. data/spec/spec_tests/data/client_side_encryption/fle2v2-CreateCollection.yml +1 -0
  167. data/spec/spec_tests/data/client_side_encryption/fle2v2-DecryptExistingData.yml +1 -0
  168. data/spec/spec_tests/data/client_side_encryption/fle2v2-Delete.yml +1 -0
  169. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.yml +1 -0
  170. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-jsonSchema.yml +1 -0
  171. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFieldsMap-defaults.yml +1 -0
  172. data/spec/spec_tests/data/client_side_encryption/fle2v2-FindOneAndUpdate.yml +1 -0
  173. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Indexed.yml +1 -0
  174. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml +1 -0
  175. data/spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml +1 -0
  176. data/spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml +1 -0
  177. data/spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml +1 -0
  178. data/spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml +2 -1
  179. data/spec/spec_tests/data/client_side_encryption/timeoutMS.yml +67 -0
  180. data/spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml +87 -0
  181. data/spec/spec_tests/data/client_side_operations_timeout/change-streams.yml +358 -0
  182. data/spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml +129 -0
  183. data/spec/spec_tests/data/client_side_operations_timeout/command-execution.yml +250 -0
  184. data/spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml +113 -0
  185. data/spec/spec_tests/data/client_side_operations_timeout/cursors.yml +70 -0
  186. data/spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml +3982 -0
  187. data/spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml +96 -0
  188. data/spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml +3236 -0
  189. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml +207 -0
  190. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml +152 -0
  191. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml +182 -0
  192. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml +100 -0
  193. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml +249 -0
  194. data/spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml +204 -0
  195. data/spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml +307 -0
  196. data/spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml +1877 -0
  197. data/spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml +1918 -0
  198. data/spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml +1676 -0
  199. data/spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml +2824 -0
  200. data/spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml +168 -0
  201. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml +171 -0
  202. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml +168 -0
  203. data/spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml +247 -0
  204. data/spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml +181 -0
  205. data/spec/spec_tests/data/crud_unified/aggregate-write-readPreference.yml +6 -0
  206. data/spec/spec_tests/data/crud_unified/db-aggregate-write-readPreference.yml +6 -0
  207. data/spec/spec_tests/data/crud_unified/find-test-all-options.yml +29 -0
  208. data/spec/spec_tests/server_selection_rtt_spec.rb +6 -6
  209. data/spec/spec_tests/transactions_unified_spec.rb +2 -1
  210. data/spec/support/certificates/atlas-ocsp-ca.crt +89 -79
  211. data/spec/support/certificates/atlas-ocsp.crt +117 -122
  212. data/spec/support/certificates/retrieve-atlas-cert +1 -1
  213. data/spec/support/cluster_tools.rb +3 -3
  214. data/spec/support/common_shortcuts.rb +2 -2
  215. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Date.json +1 -1
  216. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalNoPrecision.json +1 -1
  217. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalPrecision.json +1 -1
  218. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoubleNoPrecision.json +1 -1
  219. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoublePrecision.json +1 -1
  220. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Int.json +1 -1
  221. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Long.json +1 -1
  222. data/spec/support/shared/session.rb +2 -2
  223. data/spec/support/spec_setup.rb +2 -2
  224. data/spec/support/utils.rb +3 -1
  225. metadata +88 -173
  226. checksums.yaml.gz.sig +0 -0
  227. data/spec/mongo/server/round_trip_time_averager_spec.rb +0 -48
  228. data/spec/shared/LICENSE +0 -20
  229. data/spec/shared/bin/get-mongodb-download-url +0 -17
  230. data/spec/shared/bin/s3-copy +0 -45
  231. data/spec/shared/bin/s3-upload +0 -69
  232. data/spec/shared/lib/mrss/child_process_helper.rb +0 -80
  233. data/spec/shared/lib/mrss/cluster_config.rb +0 -231
  234. data/spec/shared/lib/mrss/constraints.rb +0 -378
  235. data/spec/shared/lib/mrss/docker_runner.rb +0 -298
  236. data/spec/shared/lib/mrss/eg_config_utils.rb +0 -51
  237. data/spec/shared/lib/mrss/event_subscriber.rb +0 -210
  238. data/spec/shared/lib/mrss/lite_constraints.rb +0 -238
  239. data/spec/shared/lib/mrss/server_version_registry.rb +0 -113
  240. data/spec/shared/lib/mrss/session_registry.rb +0 -69
  241. data/spec/shared/lib/mrss/session_registry_legacy.rb +0 -60
  242. data/spec/shared/lib/mrss/spec_organizer.rb +0 -179
  243. data/spec/shared/lib/mrss/utils.rb +0 -37
  244. data/spec/shared/share/Dockerfile.erb +0 -281
  245. data/spec/shared/share/haproxy-1.conf +0 -16
  246. data/spec/shared/share/haproxy-2.conf +0 -17
  247. data/spec/shared/shlib/config.sh +0 -27
  248. data/spec/shared/shlib/distro.sh +0 -74
  249. data/spec/shared/shlib/server.sh +0 -417
  250. data/spec/shared/shlib/set_env.sh +0 -146
  251. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml +0 -241
  252. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml +0 -422
  253. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml +0 -182
  254. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml +0 -239
  255. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml +0 -235
  256. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml +0 -252
  257. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml +0 -1687
  258. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml +0 -293
  259. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml +0 -905
  260. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml +0 -1684
  261. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml +0 -1680
  262. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml +0 -1697
  263. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml +0 -329
  264. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml +0 -424
  265. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml +0 -226
  266. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml +0 -327
  267. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml +0 -319
  268. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml +0 -336
  269. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml +0 -913
  270. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml +0 -292
  271. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml +0 -518
  272. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml +0 -911
  273. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml +0 -907
  274. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml +0 -924
  275. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml +0 -325
  276. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml +0 -424
  277. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml +0 -224
  278. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml +0 -323
  279. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml +0 -319
  280. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml +0 -338
  281. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml +0 -241
  282. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml +0 -423
  283. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml +0 -182
  284. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml +0 -239
  285. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml +0 -235
  286. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml +0 -254
  287. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml +0 -241
  288. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml +0 -422
  289. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml +0 -182
  290. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml +0 -239
  291. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml +0 -235
  292. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml +0 -254
  293. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml +0 -43
  294. data/spec/support/faas/app/aws_lambda/mongodb/Gemfile.lock +0 -19
  295. data.tar.gz.sig +0 -0
  296. metadata.gz.sig +0 -3
@@ -0,0 +1,1877 @@
1
+ # Tests in this file are generated from override-collection-timeoutMS.yml.template.
2
+
3
+ description: "timeoutMS can be overridden for a MongoCollection"
4
+
5
+ schemaVersion: "1.9"
6
+
7
+ runOnRequirements:
8
+ - minServerVersion: "4.4"
9
+ topologies: ["replicaset", "sharded"]
10
+
11
+ createEntities:
12
+ - client:
13
+ id: &failPointClient failPointClient
14
+ useMultipleMongoses: false
15
+ - client:
16
+ id: &client client
17
+ uriOptions:
18
+ timeoutMS: 10
19
+ useMultipleMongoses: false
20
+ observeEvents:
21
+ - commandStartedEvent
22
+ ignoreCommandMonitoringEvents:
23
+ - killCursors
24
+ - database:
25
+ id: &database database
26
+ client: *client
27
+ databaseName: &databaseName test
28
+
29
+ initialData:
30
+ - collectionName: &collectionName coll
31
+ databaseName: *databaseName
32
+ documents: []
33
+
34
+ tests:
35
+ # For each collection-level operation, we execute two tests:
36
+ #
37
+ # 1. timeoutMS can be overridden to a non-zero value for a MongoCollection. Each test uses the client entity defined
38
+ # above to construct a collection entity with timeoutMS=1000 and configures a fail point to block the operation for
39
+ # 15ms so the operation succeeds.
40
+ #
41
+ # 2. timeoutMS can be overridden to 0 for a MongoCollection. Each test constructs a collection entity with
42
+ # timeoutMS=0 using the global client entity and configures a fail point to block the operation for 15ms. The
43
+ # operation should succeed and the command sent to the server should not contain a maxTimeMS field.
44
+
45
+ - description: "timeoutMS can be configured on a MongoCollection - aggregate on collection"
46
+ operations:
47
+ - name: createEntities
48
+ object: testRunner
49
+ arguments:
50
+ entities:
51
+ - collection:
52
+ id: &collection collection
53
+ database: *database
54
+ collectionName: *collectionName
55
+ collectionOptions:
56
+ timeoutMS: 1000
57
+ - name: failPoint
58
+ object: testRunner
59
+ arguments:
60
+ client: *failPointClient
61
+ failPoint:
62
+ configureFailPoint: failCommand
63
+ mode: { times: 1 }
64
+ data:
65
+ failCommands: ["aggregate"]
66
+ blockConnection: true
67
+ blockTimeMS: 15
68
+ - name: aggregate
69
+ object: *collection
70
+ arguments:
71
+ pipeline: []
72
+
73
+
74
+ expectEvents:
75
+ - client: *client
76
+ events:
77
+ - commandStartedEvent:
78
+ commandName: aggregate
79
+ databaseName: *databaseName
80
+ command:
81
+ aggregate: *collectionName
82
+ maxTimeMS: { $$type: ["int", "long"] }
83
+ - description: "timeoutMS can be set to 0 on a MongoCollection - aggregate on collection"
84
+ operations:
85
+ - name: createEntities
86
+ object: testRunner
87
+ arguments:
88
+ entities:
89
+ - collection:
90
+ id: &collection collection
91
+ database: *database
92
+ collectionName: *collectionName
93
+ collectionOptions:
94
+ timeoutMS: 0
95
+ - name: failPoint
96
+ object: testRunner
97
+ arguments:
98
+ client: *failPointClient
99
+ failPoint:
100
+ configureFailPoint: failCommand
101
+ mode: { times: 1 }
102
+ data:
103
+ failCommands: ["aggregate"]
104
+ blockConnection: true
105
+ blockTimeMS: 15
106
+ - name: aggregate
107
+ object: *collection
108
+ arguments:
109
+ pipeline: []
110
+
111
+
112
+ expectEvents:
113
+ - client: *client
114
+ events:
115
+ - commandStartedEvent:
116
+ commandName: aggregate
117
+ databaseName: *databaseName
118
+ command:
119
+ aggregate: *collectionName
120
+ maxTimeMS: { $$exists: false }
121
+ - description: "timeoutMS can be configured on a MongoCollection - count on collection"
122
+ operations:
123
+ - name: createEntities
124
+ object: testRunner
125
+ arguments:
126
+ entities:
127
+ - collection:
128
+ id: &collection collection
129
+ database: *database
130
+ collectionName: *collectionName
131
+ collectionOptions:
132
+ timeoutMS: 1000
133
+ - name: failPoint
134
+ object: testRunner
135
+ arguments:
136
+ client: *failPointClient
137
+ failPoint:
138
+ configureFailPoint: failCommand
139
+ mode: { times: 1 }
140
+ data:
141
+ failCommands: ["count"]
142
+ blockConnection: true
143
+ blockTimeMS: 15
144
+ - name: count
145
+ object: *collection
146
+ arguments:
147
+ filter: {}
148
+
149
+
150
+ expectEvents:
151
+ - client: *client
152
+ events:
153
+ - commandStartedEvent:
154
+ commandName: count
155
+ databaseName: *databaseName
156
+ command:
157
+ count: *collectionName
158
+ maxTimeMS: { $$type: ["int", "long"] }
159
+ - description: "timeoutMS can be set to 0 on a MongoCollection - count on collection"
160
+ operations:
161
+ - name: createEntities
162
+ object: testRunner
163
+ arguments:
164
+ entities:
165
+ - collection:
166
+ id: &collection collection
167
+ database: *database
168
+ collectionName: *collectionName
169
+ collectionOptions:
170
+ timeoutMS: 0
171
+ - name: failPoint
172
+ object: testRunner
173
+ arguments:
174
+ client: *failPointClient
175
+ failPoint:
176
+ configureFailPoint: failCommand
177
+ mode: { times: 1 }
178
+ data:
179
+ failCommands: ["count"]
180
+ blockConnection: true
181
+ blockTimeMS: 15
182
+ - name: count
183
+ object: *collection
184
+ arguments:
185
+ filter: {}
186
+
187
+
188
+ expectEvents:
189
+ - client: *client
190
+ events:
191
+ - commandStartedEvent:
192
+ commandName: count
193
+ databaseName: *databaseName
194
+ command:
195
+ count: *collectionName
196
+ maxTimeMS: { $$exists: false }
197
+ - description: "timeoutMS can be configured on a MongoCollection - countDocuments on collection"
198
+ operations:
199
+ - name: createEntities
200
+ object: testRunner
201
+ arguments:
202
+ entities:
203
+ - collection:
204
+ id: &collection collection
205
+ database: *database
206
+ collectionName: *collectionName
207
+ collectionOptions:
208
+ timeoutMS: 1000
209
+ - name: failPoint
210
+ object: testRunner
211
+ arguments:
212
+ client: *failPointClient
213
+ failPoint:
214
+ configureFailPoint: failCommand
215
+ mode: { times: 1 }
216
+ data:
217
+ failCommands: ["aggregate"]
218
+ blockConnection: true
219
+ blockTimeMS: 15
220
+ - name: countDocuments
221
+ object: *collection
222
+ arguments:
223
+ filter: {}
224
+
225
+
226
+ expectEvents:
227
+ - client: *client
228
+ events:
229
+ - commandStartedEvent:
230
+ commandName: aggregate
231
+ databaseName: *databaseName
232
+ command:
233
+ aggregate: *collectionName
234
+ maxTimeMS: { $$type: ["int", "long"] }
235
+ - description: "timeoutMS can be set to 0 on a MongoCollection - countDocuments on collection"
236
+ operations:
237
+ - name: createEntities
238
+ object: testRunner
239
+ arguments:
240
+ entities:
241
+ - collection:
242
+ id: &collection collection
243
+ database: *database
244
+ collectionName: *collectionName
245
+ collectionOptions:
246
+ timeoutMS: 0
247
+ - name: failPoint
248
+ object: testRunner
249
+ arguments:
250
+ client: *failPointClient
251
+ failPoint:
252
+ configureFailPoint: failCommand
253
+ mode: { times: 1 }
254
+ data:
255
+ failCommands: ["aggregate"]
256
+ blockConnection: true
257
+ blockTimeMS: 15
258
+ - name: countDocuments
259
+ object: *collection
260
+ arguments:
261
+ filter: {}
262
+
263
+
264
+ expectEvents:
265
+ - client: *client
266
+ events:
267
+ - commandStartedEvent:
268
+ commandName: aggregate
269
+ databaseName: *databaseName
270
+ command:
271
+ aggregate: *collectionName
272
+ maxTimeMS: { $$exists: false }
273
+ - description: "timeoutMS can be configured on a MongoCollection - estimatedDocumentCount on collection"
274
+ operations:
275
+ - name: createEntities
276
+ object: testRunner
277
+ arguments:
278
+ entities:
279
+ - collection:
280
+ id: &collection collection
281
+ database: *database
282
+ collectionName: *collectionName
283
+ collectionOptions:
284
+ timeoutMS: 1000
285
+ - name: failPoint
286
+ object: testRunner
287
+ arguments:
288
+ client: *failPointClient
289
+ failPoint:
290
+ configureFailPoint: failCommand
291
+ mode: { times: 1 }
292
+ data:
293
+ failCommands: ["count"]
294
+ blockConnection: true
295
+ blockTimeMS: 15
296
+ - name: estimatedDocumentCount
297
+ object: *collection
298
+
299
+
300
+ expectEvents:
301
+ - client: *client
302
+ events:
303
+ - commandStartedEvent:
304
+ commandName: count
305
+ databaseName: *databaseName
306
+ command:
307
+ count: *collectionName
308
+ maxTimeMS: { $$type: ["int", "long"] }
309
+ - description: "timeoutMS can be set to 0 on a MongoCollection - estimatedDocumentCount on collection"
310
+ operations:
311
+ - name: createEntities
312
+ object: testRunner
313
+ arguments:
314
+ entities:
315
+ - collection:
316
+ id: &collection collection
317
+ database: *database
318
+ collectionName: *collectionName
319
+ collectionOptions:
320
+ timeoutMS: 0
321
+ - name: failPoint
322
+ object: testRunner
323
+ arguments:
324
+ client: *failPointClient
325
+ failPoint:
326
+ configureFailPoint: failCommand
327
+ mode: { times: 1 }
328
+ data:
329
+ failCommands: ["count"]
330
+ blockConnection: true
331
+ blockTimeMS: 15
332
+ - name: estimatedDocumentCount
333
+ object: *collection
334
+
335
+
336
+ expectEvents:
337
+ - client: *client
338
+ events:
339
+ - commandStartedEvent:
340
+ commandName: count
341
+ databaseName: *databaseName
342
+ command:
343
+ count: *collectionName
344
+ maxTimeMS: { $$exists: false }
345
+ - description: "timeoutMS can be configured on a MongoCollection - distinct on collection"
346
+ operations:
347
+ - name: createEntities
348
+ object: testRunner
349
+ arguments:
350
+ entities:
351
+ - collection:
352
+ id: &collection collection
353
+ database: *database
354
+ collectionName: *collectionName
355
+ collectionOptions:
356
+ timeoutMS: 1000
357
+ - name: failPoint
358
+ object: testRunner
359
+ arguments:
360
+ client: *failPointClient
361
+ failPoint:
362
+ configureFailPoint: failCommand
363
+ mode: { times: 1 }
364
+ data:
365
+ failCommands: ["distinct"]
366
+ blockConnection: true
367
+ blockTimeMS: 15
368
+ - name: distinct
369
+ object: *collection
370
+ arguments:
371
+ fieldName: x
372
+ filter: {}
373
+
374
+
375
+ expectEvents:
376
+ - client: *client
377
+ events:
378
+ - commandStartedEvent:
379
+ commandName: distinct
380
+ databaseName: *databaseName
381
+ command:
382
+ distinct: *collectionName
383
+ maxTimeMS: { $$type: ["int", "long"] }
384
+ - description: "timeoutMS can be set to 0 on a MongoCollection - distinct on collection"
385
+ operations:
386
+ - name: createEntities
387
+ object: testRunner
388
+ arguments:
389
+ entities:
390
+ - collection:
391
+ id: &collection collection
392
+ database: *database
393
+ collectionName: *collectionName
394
+ collectionOptions:
395
+ timeoutMS: 0
396
+ - name: failPoint
397
+ object: testRunner
398
+ arguments:
399
+ client: *failPointClient
400
+ failPoint:
401
+ configureFailPoint: failCommand
402
+ mode: { times: 1 }
403
+ data:
404
+ failCommands: ["distinct"]
405
+ blockConnection: true
406
+ blockTimeMS: 15
407
+ - name: distinct
408
+ object: *collection
409
+ arguments:
410
+ fieldName: x
411
+ filter: {}
412
+
413
+
414
+ expectEvents:
415
+ - client: *client
416
+ events:
417
+ - commandStartedEvent:
418
+ commandName: distinct
419
+ databaseName: *databaseName
420
+ command:
421
+ distinct: *collectionName
422
+ maxTimeMS: { $$exists: false }
423
+ - description: "timeoutMS can be configured on a MongoCollection - find on collection"
424
+ operations:
425
+ - name: createEntities
426
+ object: testRunner
427
+ arguments:
428
+ entities:
429
+ - collection:
430
+ id: &collection collection
431
+ database: *database
432
+ collectionName: *collectionName
433
+ collectionOptions:
434
+ timeoutMS: 1000
435
+ - name: failPoint
436
+ object: testRunner
437
+ arguments:
438
+ client: *failPointClient
439
+ failPoint:
440
+ configureFailPoint: failCommand
441
+ mode: { times: 1 }
442
+ data:
443
+ failCommands: ["find"]
444
+ blockConnection: true
445
+ blockTimeMS: 15
446
+ - name: find
447
+ object: *collection
448
+ arguments:
449
+ filter: {}
450
+
451
+
452
+ expectEvents:
453
+ - client: *client
454
+ events:
455
+ - commandStartedEvent:
456
+ commandName: find
457
+ databaseName: *databaseName
458
+ command:
459
+ find: *collectionName
460
+ maxTimeMS: { $$type: ["int", "long"] }
461
+ - description: "timeoutMS can be set to 0 on a MongoCollection - find on collection"
462
+ operations:
463
+ - name: createEntities
464
+ object: testRunner
465
+ arguments:
466
+ entities:
467
+ - collection:
468
+ id: &collection collection
469
+ database: *database
470
+ collectionName: *collectionName
471
+ collectionOptions:
472
+ timeoutMS: 0
473
+ - name: failPoint
474
+ object: testRunner
475
+ arguments:
476
+ client: *failPointClient
477
+ failPoint:
478
+ configureFailPoint: failCommand
479
+ mode: { times: 1 }
480
+ data:
481
+ failCommands: ["find"]
482
+ blockConnection: true
483
+ blockTimeMS: 15
484
+ - name: find
485
+ object: *collection
486
+ arguments:
487
+ filter: {}
488
+
489
+
490
+ expectEvents:
491
+ - client: *client
492
+ events:
493
+ - commandStartedEvent:
494
+ commandName: find
495
+ databaseName: *databaseName
496
+ command:
497
+ find: *collectionName
498
+ maxTimeMS: { $$exists: false }
499
+ - description: "timeoutMS can be configured on a MongoCollection - findOne on collection"
500
+ operations:
501
+ - name: createEntities
502
+ object: testRunner
503
+ arguments:
504
+ entities:
505
+ - collection:
506
+ id: &collection collection
507
+ database: *database
508
+ collectionName: *collectionName
509
+ collectionOptions:
510
+ timeoutMS: 1000
511
+ - name: failPoint
512
+ object: testRunner
513
+ arguments:
514
+ client: *failPointClient
515
+ failPoint:
516
+ configureFailPoint: failCommand
517
+ mode: { times: 1 }
518
+ data:
519
+ failCommands: ["find"]
520
+ blockConnection: true
521
+ blockTimeMS: 15
522
+ - name: findOne
523
+ object: *collection
524
+ arguments:
525
+ filter: {}
526
+
527
+
528
+ expectEvents:
529
+ - client: *client
530
+ events:
531
+ - commandStartedEvent:
532
+ commandName: find
533
+ databaseName: *databaseName
534
+ command:
535
+ find: *collectionName
536
+ maxTimeMS: { $$type: ["int", "long"] }
537
+ - description: "timeoutMS can be set to 0 on a MongoCollection - findOne on collection"
538
+ operations:
539
+ - name: createEntities
540
+ object: testRunner
541
+ arguments:
542
+ entities:
543
+ - collection:
544
+ id: &collection collection
545
+ database: *database
546
+ collectionName: *collectionName
547
+ collectionOptions:
548
+ timeoutMS: 0
549
+ - name: failPoint
550
+ object: testRunner
551
+ arguments:
552
+ client: *failPointClient
553
+ failPoint:
554
+ configureFailPoint: failCommand
555
+ mode: { times: 1 }
556
+ data:
557
+ failCommands: ["find"]
558
+ blockConnection: true
559
+ blockTimeMS: 15
560
+ - name: findOne
561
+ object: *collection
562
+ arguments:
563
+ filter: {}
564
+
565
+
566
+ expectEvents:
567
+ - client: *client
568
+ events:
569
+ - commandStartedEvent:
570
+ commandName: find
571
+ databaseName: *databaseName
572
+ command:
573
+ find: *collectionName
574
+ maxTimeMS: { $$exists: false }
575
+ - description: "timeoutMS can be configured on a MongoCollection - listIndexes on collection"
576
+ operations:
577
+ - name: createEntities
578
+ object: testRunner
579
+ arguments:
580
+ entities:
581
+ - collection:
582
+ id: &collection collection
583
+ database: *database
584
+ collectionName: *collectionName
585
+ collectionOptions:
586
+ timeoutMS: 1000
587
+ - name: failPoint
588
+ object: testRunner
589
+ arguments:
590
+ client: *failPointClient
591
+ failPoint:
592
+ configureFailPoint: failCommand
593
+ mode: { times: 1 }
594
+ data:
595
+ failCommands: ["listIndexes"]
596
+ blockConnection: true
597
+ blockTimeMS: 15
598
+ - name: listIndexes
599
+ object: *collection
600
+
601
+
602
+ expectEvents:
603
+ - client: *client
604
+ events:
605
+ - commandStartedEvent:
606
+ commandName: listIndexes
607
+ databaseName: *databaseName
608
+ command:
609
+ listIndexes: *collectionName
610
+ maxTimeMS: { $$type: ["int", "long"] }
611
+ - description: "timeoutMS can be set to 0 on a MongoCollection - listIndexes on collection"
612
+ operations:
613
+ - name: createEntities
614
+ object: testRunner
615
+ arguments:
616
+ entities:
617
+ - collection:
618
+ id: &collection collection
619
+ database: *database
620
+ collectionName: *collectionName
621
+ collectionOptions:
622
+ timeoutMS: 0
623
+ - name: failPoint
624
+ object: testRunner
625
+ arguments:
626
+ client: *failPointClient
627
+ failPoint:
628
+ configureFailPoint: failCommand
629
+ mode: { times: 1 }
630
+ data:
631
+ failCommands: ["listIndexes"]
632
+ blockConnection: true
633
+ blockTimeMS: 15
634
+ - name: listIndexes
635
+ object: *collection
636
+
637
+
638
+ expectEvents:
639
+ - client: *client
640
+ events:
641
+ - commandStartedEvent:
642
+ commandName: listIndexes
643
+ databaseName: *databaseName
644
+ command:
645
+ listIndexes: *collectionName
646
+ maxTimeMS: { $$exists: false }
647
+ - description: "timeoutMS can be configured on a MongoCollection - listIndexNames on collection"
648
+ operations:
649
+ - name: createEntities
650
+ object: testRunner
651
+ arguments:
652
+ entities:
653
+ - collection:
654
+ id: &collection collection
655
+ database: *database
656
+ collectionName: *collectionName
657
+ collectionOptions:
658
+ timeoutMS: 1000
659
+ - name: failPoint
660
+ object: testRunner
661
+ arguments:
662
+ client: *failPointClient
663
+ failPoint:
664
+ configureFailPoint: failCommand
665
+ mode: { times: 1 }
666
+ data:
667
+ failCommands: ["listIndexes"]
668
+ blockConnection: true
669
+ blockTimeMS: 15
670
+ - name: listIndexNames
671
+ object: *collection
672
+
673
+
674
+ expectEvents:
675
+ - client: *client
676
+ events:
677
+ - commandStartedEvent:
678
+ commandName: listIndexes
679
+ databaseName: *databaseName
680
+ command:
681
+ listIndexes: *collectionName
682
+ maxTimeMS: { $$type: ["int", "long"] }
683
+ - description: "timeoutMS can be set to 0 on a MongoCollection - listIndexNames on collection"
684
+ operations:
685
+ - name: createEntities
686
+ object: testRunner
687
+ arguments:
688
+ entities:
689
+ - collection:
690
+ id: &collection collection
691
+ database: *database
692
+ collectionName: *collectionName
693
+ collectionOptions:
694
+ timeoutMS: 0
695
+ - name: failPoint
696
+ object: testRunner
697
+ arguments:
698
+ client: *failPointClient
699
+ failPoint:
700
+ configureFailPoint: failCommand
701
+ mode: { times: 1 }
702
+ data:
703
+ failCommands: ["listIndexes"]
704
+ blockConnection: true
705
+ blockTimeMS: 15
706
+ - name: listIndexNames
707
+ object: *collection
708
+
709
+
710
+ expectEvents:
711
+ - client: *client
712
+ events:
713
+ - commandStartedEvent:
714
+ commandName: listIndexes
715
+ databaseName: *databaseName
716
+ command:
717
+ listIndexes: *collectionName
718
+ maxTimeMS: { $$exists: false }
719
+ - description: "timeoutMS can be configured on a MongoCollection - createChangeStream on collection"
720
+ operations:
721
+ - name: createEntities
722
+ object: testRunner
723
+ arguments:
724
+ entities:
725
+ - collection:
726
+ id: &collection collection
727
+ database: *database
728
+ collectionName: *collectionName
729
+ collectionOptions:
730
+ timeoutMS: 1000
731
+ - name: failPoint
732
+ object: testRunner
733
+ arguments:
734
+ client: *failPointClient
735
+ failPoint:
736
+ configureFailPoint: failCommand
737
+ mode: { times: 1 }
738
+ data:
739
+ failCommands: ["aggregate"]
740
+ blockConnection: true
741
+ blockTimeMS: 15
742
+ - name: createChangeStream
743
+ object: *collection
744
+ arguments:
745
+ pipeline: []
746
+
747
+
748
+ expectEvents:
749
+ - client: *client
750
+ events:
751
+ - commandStartedEvent:
752
+ commandName: aggregate
753
+ databaseName: *databaseName
754
+ command:
755
+ aggregate: *collectionName
756
+ maxTimeMS: { $$type: ["int", "long"] }
757
+ - description: "timeoutMS can be set to 0 on a MongoCollection - createChangeStream on collection"
758
+ operations:
759
+ - name: createEntities
760
+ object: testRunner
761
+ arguments:
762
+ entities:
763
+ - collection:
764
+ id: &collection collection
765
+ database: *database
766
+ collectionName: *collectionName
767
+ collectionOptions:
768
+ timeoutMS: 0
769
+ - name: failPoint
770
+ object: testRunner
771
+ arguments:
772
+ client: *failPointClient
773
+ failPoint:
774
+ configureFailPoint: failCommand
775
+ mode: { times: 1 }
776
+ data:
777
+ failCommands: ["aggregate"]
778
+ blockConnection: true
779
+ blockTimeMS: 15
780
+ - name: createChangeStream
781
+ object: *collection
782
+ arguments:
783
+ pipeline: []
784
+
785
+
786
+ expectEvents:
787
+ - client: *client
788
+ events:
789
+ - commandStartedEvent:
790
+ commandName: aggregate
791
+ databaseName: *databaseName
792
+ command:
793
+ aggregate: *collectionName
794
+ maxTimeMS: { $$exists: false }
795
+ - description: "timeoutMS can be configured on a MongoCollection - insertOne on collection"
796
+ operations:
797
+ - name: createEntities
798
+ object: testRunner
799
+ arguments:
800
+ entities:
801
+ - collection:
802
+ id: &collection collection
803
+ database: *database
804
+ collectionName: *collectionName
805
+ collectionOptions:
806
+ timeoutMS: 1000
807
+ - name: failPoint
808
+ object: testRunner
809
+ arguments:
810
+ client: *failPointClient
811
+ failPoint:
812
+ configureFailPoint: failCommand
813
+ mode: { times: 1 }
814
+ data:
815
+ failCommands: ["insert"]
816
+ blockConnection: true
817
+ blockTimeMS: 15
818
+ - name: insertOne
819
+ object: *collection
820
+ arguments:
821
+ document: { x: 1 }
822
+
823
+
824
+ expectEvents:
825
+ - client: *client
826
+ events:
827
+ - commandStartedEvent:
828
+ commandName: insert
829
+ databaseName: *databaseName
830
+ command:
831
+ insert: *collectionName
832
+ maxTimeMS: { $$type: ["int", "long"] }
833
+ - description: "timeoutMS can be set to 0 on a MongoCollection - insertOne on collection"
834
+ operations:
835
+ - name: createEntities
836
+ object: testRunner
837
+ arguments:
838
+ entities:
839
+ - collection:
840
+ id: &collection collection
841
+ database: *database
842
+ collectionName: *collectionName
843
+ collectionOptions:
844
+ timeoutMS: 0
845
+ - name: failPoint
846
+ object: testRunner
847
+ arguments:
848
+ client: *failPointClient
849
+ failPoint:
850
+ configureFailPoint: failCommand
851
+ mode: { times: 1 }
852
+ data:
853
+ failCommands: ["insert"]
854
+ blockConnection: true
855
+ blockTimeMS: 15
856
+ - name: insertOne
857
+ object: *collection
858
+ arguments:
859
+ document: { x: 1 }
860
+
861
+
862
+ expectEvents:
863
+ - client: *client
864
+ events:
865
+ - commandStartedEvent:
866
+ commandName: insert
867
+ databaseName: *databaseName
868
+ command:
869
+ insert: *collectionName
870
+ maxTimeMS: { $$exists: false }
871
+ - description: "timeoutMS can be configured on a MongoCollection - insertMany on collection"
872
+ operations:
873
+ - name: createEntities
874
+ object: testRunner
875
+ arguments:
876
+ entities:
877
+ - collection:
878
+ id: &collection collection
879
+ database: *database
880
+ collectionName: *collectionName
881
+ collectionOptions:
882
+ timeoutMS: 1000
883
+ - name: failPoint
884
+ object: testRunner
885
+ arguments:
886
+ client: *failPointClient
887
+ failPoint:
888
+ configureFailPoint: failCommand
889
+ mode: { times: 1 }
890
+ data:
891
+ failCommands: ["insert"]
892
+ blockConnection: true
893
+ blockTimeMS: 15
894
+ - name: insertMany
895
+ object: *collection
896
+ arguments:
897
+ documents:
898
+ - { x: 1 }
899
+
900
+
901
+ expectEvents:
902
+ - client: *client
903
+ events:
904
+ - commandStartedEvent:
905
+ commandName: insert
906
+ databaseName: *databaseName
907
+ command:
908
+ insert: *collectionName
909
+ maxTimeMS: { $$type: ["int", "long"] }
910
+ - description: "timeoutMS can be set to 0 on a MongoCollection - insertMany on collection"
911
+ operations:
912
+ - name: createEntities
913
+ object: testRunner
914
+ arguments:
915
+ entities:
916
+ - collection:
917
+ id: &collection collection
918
+ database: *database
919
+ collectionName: *collectionName
920
+ collectionOptions:
921
+ timeoutMS: 0
922
+ - name: failPoint
923
+ object: testRunner
924
+ arguments:
925
+ client: *failPointClient
926
+ failPoint:
927
+ configureFailPoint: failCommand
928
+ mode: { times: 1 }
929
+ data:
930
+ failCommands: ["insert"]
931
+ blockConnection: true
932
+ blockTimeMS: 15
933
+ - name: insertMany
934
+ object: *collection
935
+ arguments:
936
+ documents:
937
+ - { x: 1 }
938
+
939
+
940
+ expectEvents:
941
+ - client: *client
942
+ events:
943
+ - commandStartedEvent:
944
+ commandName: insert
945
+ databaseName: *databaseName
946
+ command:
947
+ insert: *collectionName
948
+ maxTimeMS: { $$exists: false }
949
+ - description: "timeoutMS can be configured on a MongoCollection - deleteOne on collection"
950
+ operations:
951
+ - name: createEntities
952
+ object: testRunner
953
+ arguments:
954
+ entities:
955
+ - collection:
956
+ id: &collection collection
957
+ database: *database
958
+ collectionName: *collectionName
959
+ collectionOptions:
960
+ timeoutMS: 1000
961
+ - name: failPoint
962
+ object: testRunner
963
+ arguments:
964
+ client: *failPointClient
965
+ failPoint:
966
+ configureFailPoint: failCommand
967
+ mode: { times: 1 }
968
+ data:
969
+ failCommands: ["delete"]
970
+ blockConnection: true
971
+ blockTimeMS: 15
972
+ - name: deleteOne
973
+ object: *collection
974
+ arguments:
975
+ filter: {}
976
+
977
+
978
+ expectEvents:
979
+ - client: *client
980
+ events:
981
+ - commandStartedEvent:
982
+ commandName: delete
983
+ databaseName: *databaseName
984
+ command:
985
+ delete: *collectionName
986
+ maxTimeMS: { $$type: ["int", "long"] }
987
+ - description: "timeoutMS can be set to 0 on a MongoCollection - deleteOne on collection"
988
+ operations:
989
+ - name: createEntities
990
+ object: testRunner
991
+ arguments:
992
+ entities:
993
+ - collection:
994
+ id: &collection collection
995
+ database: *database
996
+ collectionName: *collectionName
997
+ collectionOptions:
998
+ timeoutMS: 0
999
+ - name: failPoint
1000
+ object: testRunner
1001
+ arguments:
1002
+ client: *failPointClient
1003
+ failPoint:
1004
+ configureFailPoint: failCommand
1005
+ mode: { times: 1 }
1006
+ data:
1007
+ failCommands: ["delete"]
1008
+ blockConnection: true
1009
+ blockTimeMS: 15
1010
+ - name: deleteOne
1011
+ object: *collection
1012
+ arguments:
1013
+ filter: {}
1014
+
1015
+
1016
+ expectEvents:
1017
+ - client: *client
1018
+ events:
1019
+ - commandStartedEvent:
1020
+ commandName: delete
1021
+ databaseName: *databaseName
1022
+ command:
1023
+ delete: *collectionName
1024
+ maxTimeMS: { $$exists: false }
1025
+ - description: "timeoutMS can be configured on a MongoCollection - deleteMany on collection"
1026
+ operations:
1027
+ - name: createEntities
1028
+ object: testRunner
1029
+ arguments:
1030
+ entities:
1031
+ - collection:
1032
+ id: &collection collection
1033
+ database: *database
1034
+ collectionName: *collectionName
1035
+ collectionOptions:
1036
+ timeoutMS: 1000
1037
+ - name: failPoint
1038
+ object: testRunner
1039
+ arguments:
1040
+ client: *failPointClient
1041
+ failPoint:
1042
+ configureFailPoint: failCommand
1043
+ mode: { times: 1 }
1044
+ data:
1045
+ failCommands: ["delete"]
1046
+ blockConnection: true
1047
+ blockTimeMS: 15
1048
+ - name: deleteMany
1049
+ object: *collection
1050
+ arguments:
1051
+ filter: {}
1052
+
1053
+
1054
+ expectEvents:
1055
+ - client: *client
1056
+ events:
1057
+ - commandStartedEvent:
1058
+ commandName: delete
1059
+ databaseName: *databaseName
1060
+ command:
1061
+ delete: *collectionName
1062
+ maxTimeMS: { $$type: ["int", "long"] }
1063
+ - description: "timeoutMS can be set to 0 on a MongoCollection - deleteMany on collection"
1064
+ operations:
1065
+ - name: createEntities
1066
+ object: testRunner
1067
+ arguments:
1068
+ entities:
1069
+ - collection:
1070
+ id: &collection collection
1071
+ database: *database
1072
+ collectionName: *collectionName
1073
+ collectionOptions:
1074
+ timeoutMS: 0
1075
+ - name: failPoint
1076
+ object: testRunner
1077
+ arguments:
1078
+ client: *failPointClient
1079
+ failPoint:
1080
+ configureFailPoint: failCommand
1081
+ mode: { times: 1 }
1082
+ data:
1083
+ failCommands: ["delete"]
1084
+ blockConnection: true
1085
+ blockTimeMS: 15
1086
+ - name: deleteMany
1087
+ object: *collection
1088
+ arguments:
1089
+ filter: {}
1090
+
1091
+
1092
+ expectEvents:
1093
+ - client: *client
1094
+ events:
1095
+ - commandStartedEvent:
1096
+ commandName: delete
1097
+ databaseName: *databaseName
1098
+ command:
1099
+ delete: *collectionName
1100
+ maxTimeMS: { $$exists: false }
1101
+ - description: "timeoutMS can be configured on a MongoCollection - replaceOne on collection"
1102
+ operations:
1103
+ - name: createEntities
1104
+ object: testRunner
1105
+ arguments:
1106
+ entities:
1107
+ - collection:
1108
+ id: &collection collection
1109
+ database: *database
1110
+ collectionName: *collectionName
1111
+ collectionOptions:
1112
+ timeoutMS: 1000
1113
+ - name: failPoint
1114
+ object: testRunner
1115
+ arguments:
1116
+ client: *failPointClient
1117
+ failPoint:
1118
+ configureFailPoint: failCommand
1119
+ mode: { times: 1 }
1120
+ data:
1121
+ failCommands: ["update"]
1122
+ blockConnection: true
1123
+ blockTimeMS: 15
1124
+ - name: replaceOne
1125
+ object: *collection
1126
+ arguments:
1127
+ filter: {}
1128
+ replacement: { x: 1 }
1129
+
1130
+
1131
+ expectEvents:
1132
+ - client: *client
1133
+ events:
1134
+ - commandStartedEvent:
1135
+ commandName: update
1136
+ databaseName: *databaseName
1137
+ command:
1138
+ update: *collectionName
1139
+ maxTimeMS: { $$type: ["int", "long"] }
1140
+ - description: "timeoutMS can be set to 0 on a MongoCollection - replaceOne on collection"
1141
+ operations:
1142
+ - name: createEntities
1143
+ object: testRunner
1144
+ arguments:
1145
+ entities:
1146
+ - collection:
1147
+ id: &collection collection
1148
+ database: *database
1149
+ collectionName: *collectionName
1150
+ collectionOptions:
1151
+ timeoutMS: 0
1152
+ - name: failPoint
1153
+ object: testRunner
1154
+ arguments:
1155
+ client: *failPointClient
1156
+ failPoint:
1157
+ configureFailPoint: failCommand
1158
+ mode: { times: 1 }
1159
+ data:
1160
+ failCommands: ["update"]
1161
+ blockConnection: true
1162
+ blockTimeMS: 15
1163
+ - name: replaceOne
1164
+ object: *collection
1165
+ arguments:
1166
+ filter: {}
1167
+ replacement: { x: 1 }
1168
+
1169
+
1170
+ expectEvents:
1171
+ - client: *client
1172
+ events:
1173
+ - commandStartedEvent:
1174
+ commandName: update
1175
+ databaseName: *databaseName
1176
+ command:
1177
+ update: *collectionName
1178
+ maxTimeMS: { $$exists: false }
1179
+ - description: "timeoutMS can be configured on a MongoCollection - updateOne on collection"
1180
+ operations:
1181
+ - name: createEntities
1182
+ object: testRunner
1183
+ arguments:
1184
+ entities:
1185
+ - collection:
1186
+ id: &collection collection
1187
+ database: *database
1188
+ collectionName: *collectionName
1189
+ collectionOptions:
1190
+ timeoutMS: 1000
1191
+ - name: failPoint
1192
+ object: testRunner
1193
+ arguments:
1194
+ client: *failPointClient
1195
+ failPoint:
1196
+ configureFailPoint: failCommand
1197
+ mode: { times: 1 }
1198
+ data:
1199
+ failCommands: ["update"]
1200
+ blockConnection: true
1201
+ blockTimeMS: 15
1202
+ - name: updateOne
1203
+ object: *collection
1204
+ arguments:
1205
+ filter: {}
1206
+ update: { $set: { x: 1 } }
1207
+
1208
+
1209
+ expectEvents:
1210
+ - client: *client
1211
+ events:
1212
+ - commandStartedEvent:
1213
+ commandName: update
1214
+ databaseName: *databaseName
1215
+ command:
1216
+ update: *collectionName
1217
+ maxTimeMS: { $$type: ["int", "long"] }
1218
+ - description: "timeoutMS can be set to 0 on a MongoCollection - updateOne on collection"
1219
+ operations:
1220
+ - name: createEntities
1221
+ object: testRunner
1222
+ arguments:
1223
+ entities:
1224
+ - collection:
1225
+ id: &collection collection
1226
+ database: *database
1227
+ collectionName: *collectionName
1228
+ collectionOptions:
1229
+ timeoutMS: 0
1230
+ - name: failPoint
1231
+ object: testRunner
1232
+ arguments:
1233
+ client: *failPointClient
1234
+ failPoint:
1235
+ configureFailPoint: failCommand
1236
+ mode: { times: 1 }
1237
+ data:
1238
+ failCommands: ["update"]
1239
+ blockConnection: true
1240
+ blockTimeMS: 15
1241
+ - name: updateOne
1242
+ object: *collection
1243
+ arguments:
1244
+ filter: {}
1245
+ update: { $set: { x: 1 } }
1246
+
1247
+
1248
+ expectEvents:
1249
+ - client: *client
1250
+ events:
1251
+ - commandStartedEvent:
1252
+ commandName: update
1253
+ databaseName: *databaseName
1254
+ command:
1255
+ update: *collectionName
1256
+ maxTimeMS: { $$exists: false }
1257
+ - description: "timeoutMS can be configured on a MongoCollection - updateMany on collection"
1258
+ operations:
1259
+ - name: createEntities
1260
+ object: testRunner
1261
+ arguments:
1262
+ entities:
1263
+ - collection:
1264
+ id: &collection collection
1265
+ database: *database
1266
+ collectionName: *collectionName
1267
+ collectionOptions:
1268
+ timeoutMS: 1000
1269
+ - name: failPoint
1270
+ object: testRunner
1271
+ arguments:
1272
+ client: *failPointClient
1273
+ failPoint:
1274
+ configureFailPoint: failCommand
1275
+ mode: { times: 1 }
1276
+ data:
1277
+ failCommands: ["update"]
1278
+ blockConnection: true
1279
+ blockTimeMS: 15
1280
+ - name: updateMany
1281
+ object: *collection
1282
+ arguments:
1283
+ filter: {}
1284
+ update: { $set: { x: 1 } }
1285
+
1286
+
1287
+ expectEvents:
1288
+ - client: *client
1289
+ events:
1290
+ - commandStartedEvent:
1291
+ commandName: update
1292
+ databaseName: *databaseName
1293
+ command:
1294
+ update: *collectionName
1295
+ maxTimeMS: { $$type: ["int", "long"] }
1296
+ - description: "timeoutMS can be set to 0 on a MongoCollection - updateMany on collection"
1297
+ operations:
1298
+ - name: createEntities
1299
+ object: testRunner
1300
+ arguments:
1301
+ entities:
1302
+ - collection:
1303
+ id: &collection collection
1304
+ database: *database
1305
+ collectionName: *collectionName
1306
+ collectionOptions:
1307
+ timeoutMS: 0
1308
+ - name: failPoint
1309
+ object: testRunner
1310
+ arguments:
1311
+ client: *failPointClient
1312
+ failPoint:
1313
+ configureFailPoint: failCommand
1314
+ mode: { times: 1 }
1315
+ data:
1316
+ failCommands: ["update"]
1317
+ blockConnection: true
1318
+ blockTimeMS: 15
1319
+ - name: updateMany
1320
+ object: *collection
1321
+ arguments:
1322
+ filter: {}
1323
+ update: { $set: { x: 1 } }
1324
+
1325
+
1326
+ expectEvents:
1327
+ - client: *client
1328
+ events:
1329
+ - commandStartedEvent:
1330
+ commandName: update
1331
+ databaseName: *databaseName
1332
+ command:
1333
+ update: *collectionName
1334
+ maxTimeMS: { $$exists: false }
1335
+ - description: "timeoutMS can be configured on a MongoCollection - findOneAndDelete on collection"
1336
+ operations:
1337
+ - name: createEntities
1338
+ object: testRunner
1339
+ arguments:
1340
+ entities:
1341
+ - collection:
1342
+ id: &collection collection
1343
+ database: *database
1344
+ collectionName: *collectionName
1345
+ collectionOptions:
1346
+ timeoutMS: 1000
1347
+ - name: failPoint
1348
+ object: testRunner
1349
+ arguments:
1350
+ client: *failPointClient
1351
+ failPoint:
1352
+ configureFailPoint: failCommand
1353
+ mode: { times: 1 }
1354
+ data:
1355
+ failCommands: ["findAndModify"]
1356
+ blockConnection: true
1357
+ blockTimeMS: 15
1358
+ - name: findOneAndDelete
1359
+ object: *collection
1360
+ arguments:
1361
+ filter: {}
1362
+
1363
+
1364
+ expectEvents:
1365
+ - client: *client
1366
+ events:
1367
+ - commandStartedEvent:
1368
+ commandName: findAndModify
1369
+ databaseName: *databaseName
1370
+ command:
1371
+ findAndModify: *collectionName
1372
+ maxTimeMS: { $$type: ["int", "long"] }
1373
+ - description: "timeoutMS can be set to 0 on a MongoCollection - findOneAndDelete on collection"
1374
+ operations:
1375
+ - name: createEntities
1376
+ object: testRunner
1377
+ arguments:
1378
+ entities:
1379
+ - collection:
1380
+ id: &collection collection
1381
+ database: *database
1382
+ collectionName: *collectionName
1383
+ collectionOptions:
1384
+ timeoutMS: 0
1385
+ - name: failPoint
1386
+ object: testRunner
1387
+ arguments:
1388
+ client: *failPointClient
1389
+ failPoint:
1390
+ configureFailPoint: failCommand
1391
+ mode: { times: 1 }
1392
+ data:
1393
+ failCommands: ["findAndModify"]
1394
+ blockConnection: true
1395
+ blockTimeMS: 15
1396
+ - name: findOneAndDelete
1397
+ object: *collection
1398
+ arguments:
1399
+ filter: {}
1400
+
1401
+
1402
+ expectEvents:
1403
+ - client: *client
1404
+ events:
1405
+ - commandStartedEvent:
1406
+ commandName: findAndModify
1407
+ databaseName: *databaseName
1408
+ command:
1409
+ findAndModify: *collectionName
1410
+ maxTimeMS: { $$exists: false }
1411
+ - description: "timeoutMS can be configured on a MongoCollection - findOneAndReplace on collection"
1412
+ operations:
1413
+ - name: createEntities
1414
+ object: testRunner
1415
+ arguments:
1416
+ entities:
1417
+ - collection:
1418
+ id: &collection collection
1419
+ database: *database
1420
+ collectionName: *collectionName
1421
+ collectionOptions:
1422
+ timeoutMS: 1000
1423
+ - name: failPoint
1424
+ object: testRunner
1425
+ arguments:
1426
+ client: *failPointClient
1427
+ failPoint:
1428
+ configureFailPoint: failCommand
1429
+ mode: { times: 1 }
1430
+ data:
1431
+ failCommands: ["findAndModify"]
1432
+ blockConnection: true
1433
+ blockTimeMS: 15
1434
+ - name: findOneAndReplace
1435
+ object: *collection
1436
+ arguments:
1437
+ filter: {}
1438
+ replacement: { x: 1 }
1439
+
1440
+
1441
+ expectEvents:
1442
+ - client: *client
1443
+ events:
1444
+ - commandStartedEvent:
1445
+ commandName: findAndModify
1446
+ databaseName: *databaseName
1447
+ command:
1448
+ findAndModify: *collectionName
1449
+ maxTimeMS: { $$type: ["int", "long"] }
1450
+ - description: "timeoutMS can be set to 0 on a MongoCollection - findOneAndReplace on collection"
1451
+ operations:
1452
+ - name: createEntities
1453
+ object: testRunner
1454
+ arguments:
1455
+ entities:
1456
+ - collection:
1457
+ id: &collection collection
1458
+ database: *database
1459
+ collectionName: *collectionName
1460
+ collectionOptions:
1461
+ timeoutMS: 0
1462
+ - name: failPoint
1463
+ object: testRunner
1464
+ arguments:
1465
+ client: *failPointClient
1466
+ failPoint:
1467
+ configureFailPoint: failCommand
1468
+ mode: { times: 1 }
1469
+ data:
1470
+ failCommands: ["findAndModify"]
1471
+ blockConnection: true
1472
+ blockTimeMS: 15
1473
+ - name: findOneAndReplace
1474
+ object: *collection
1475
+ arguments:
1476
+ filter: {}
1477
+ replacement: { x: 1 }
1478
+
1479
+
1480
+ expectEvents:
1481
+ - client: *client
1482
+ events:
1483
+ - commandStartedEvent:
1484
+ commandName: findAndModify
1485
+ databaseName: *databaseName
1486
+ command:
1487
+ findAndModify: *collectionName
1488
+ maxTimeMS: { $$exists: false }
1489
+ - description: "timeoutMS can be configured on a MongoCollection - findOneAndUpdate on collection"
1490
+ operations:
1491
+ - name: createEntities
1492
+ object: testRunner
1493
+ arguments:
1494
+ entities:
1495
+ - collection:
1496
+ id: &collection collection
1497
+ database: *database
1498
+ collectionName: *collectionName
1499
+ collectionOptions:
1500
+ timeoutMS: 1000
1501
+ - name: failPoint
1502
+ object: testRunner
1503
+ arguments:
1504
+ client: *failPointClient
1505
+ failPoint:
1506
+ configureFailPoint: failCommand
1507
+ mode: { times: 1 }
1508
+ data:
1509
+ failCommands: ["findAndModify"]
1510
+ blockConnection: true
1511
+ blockTimeMS: 15
1512
+ - name: findOneAndUpdate
1513
+ object: *collection
1514
+ arguments:
1515
+ filter: {}
1516
+ update: { $set: { x: 1 } }
1517
+
1518
+
1519
+ expectEvents:
1520
+ - client: *client
1521
+ events:
1522
+ - commandStartedEvent:
1523
+ commandName: findAndModify
1524
+ databaseName: *databaseName
1525
+ command:
1526
+ findAndModify: *collectionName
1527
+ maxTimeMS: { $$type: ["int", "long"] }
1528
+ - description: "timeoutMS can be set to 0 on a MongoCollection - findOneAndUpdate on collection"
1529
+ operations:
1530
+ - name: createEntities
1531
+ object: testRunner
1532
+ arguments:
1533
+ entities:
1534
+ - collection:
1535
+ id: &collection collection
1536
+ database: *database
1537
+ collectionName: *collectionName
1538
+ collectionOptions:
1539
+ timeoutMS: 0
1540
+ - name: failPoint
1541
+ object: testRunner
1542
+ arguments:
1543
+ client: *failPointClient
1544
+ failPoint:
1545
+ configureFailPoint: failCommand
1546
+ mode: { times: 1 }
1547
+ data:
1548
+ failCommands: ["findAndModify"]
1549
+ blockConnection: true
1550
+ blockTimeMS: 15
1551
+ - name: findOneAndUpdate
1552
+ object: *collection
1553
+ arguments:
1554
+ filter: {}
1555
+ update: { $set: { x: 1 } }
1556
+
1557
+
1558
+ expectEvents:
1559
+ - client: *client
1560
+ events:
1561
+ - commandStartedEvent:
1562
+ commandName: findAndModify
1563
+ databaseName: *databaseName
1564
+ command:
1565
+ findAndModify: *collectionName
1566
+ maxTimeMS: { $$exists: false }
1567
+ - description: "timeoutMS can be configured on a MongoCollection - bulkWrite on collection"
1568
+ operations:
1569
+ - name: createEntities
1570
+ object: testRunner
1571
+ arguments:
1572
+ entities:
1573
+ - collection:
1574
+ id: &collection collection
1575
+ database: *database
1576
+ collectionName: *collectionName
1577
+ collectionOptions:
1578
+ timeoutMS: 1000
1579
+ - name: failPoint
1580
+ object: testRunner
1581
+ arguments:
1582
+ client: *failPointClient
1583
+ failPoint:
1584
+ configureFailPoint: failCommand
1585
+ mode: { times: 1 }
1586
+ data:
1587
+ failCommands: ["insert"]
1588
+ blockConnection: true
1589
+ blockTimeMS: 15
1590
+ - name: bulkWrite
1591
+ object: *collection
1592
+ arguments:
1593
+ requests:
1594
+ - insertOne:
1595
+ document: { _id: 1 }
1596
+
1597
+
1598
+ expectEvents:
1599
+ - client: *client
1600
+ events:
1601
+ - commandStartedEvent:
1602
+ commandName: insert
1603
+ databaseName: *databaseName
1604
+ command:
1605
+ insert: *collectionName
1606
+ maxTimeMS: { $$type: ["int", "long"] }
1607
+ - description: "timeoutMS can be set to 0 on a MongoCollection - bulkWrite on collection"
1608
+ operations:
1609
+ - name: createEntities
1610
+ object: testRunner
1611
+ arguments:
1612
+ entities:
1613
+ - collection:
1614
+ id: &collection collection
1615
+ database: *database
1616
+ collectionName: *collectionName
1617
+ collectionOptions:
1618
+ timeoutMS: 0
1619
+ - name: failPoint
1620
+ object: testRunner
1621
+ arguments:
1622
+ client: *failPointClient
1623
+ failPoint:
1624
+ configureFailPoint: failCommand
1625
+ mode: { times: 1 }
1626
+ data:
1627
+ failCommands: ["insert"]
1628
+ blockConnection: true
1629
+ blockTimeMS: 15
1630
+ - name: bulkWrite
1631
+ object: *collection
1632
+ arguments:
1633
+ requests:
1634
+ - insertOne:
1635
+ document: { _id: 1 }
1636
+
1637
+
1638
+ expectEvents:
1639
+ - client: *client
1640
+ events:
1641
+ - commandStartedEvent:
1642
+ commandName: insert
1643
+ databaseName: *databaseName
1644
+ command:
1645
+ insert: *collectionName
1646
+ maxTimeMS: { $$exists: false }
1647
+ - description: "timeoutMS can be configured on a MongoCollection - createIndex on collection"
1648
+ operations:
1649
+ - name: createEntities
1650
+ object: testRunner
1651
+ arguments:
1652
+ entities:
1653
+ - collection:
1654
+ id: &collection collection
1655
+ database: *database
1656
+ collectionName: *collectionName
1657
+ collectionOptions:
1658
+ timeoutMS: 1000
1659
+ - name: failPoint
1660
+ object: testRunner
1661
+ arguments:
1662
+ client: *failPointClient
1663
+ failPoint:
1664
+ configureFailPoint: failCommand
1665
+ mode: { times: 1 }
1666
+ data:
1667
+ failCommands: ["createIndexes"]
1668
+ blockConnection: true
1669
+ blockTimeMS: 15
1670
+ - name: createIndex
1671
+ object: *collection
1672
+ arguments:
1673
+ keys: { x: 1 }
1674
+ name: "x_1"
1675
+
1676
+
1677
+ expectEvents:
1678
+ - client: *client
1679
+ events:
1680
+ - commandStartedEvent:
1681
+ commandName: createIndexes
1682
+ databaseName: *databaseName
1683
+ command:
1684
+ createIndexes: *collectionName
1685
+ maxTimeMS: { $$type: ["int", "long"] }
1686
+ - description: "timeoutMS can be set to 0 on a MongoCollection - createIndex on collection"
1687
+ operations:
1688
+ - name: createEntities
1689
+ object: testRunner
1690
+ arguments:
1691
+ entities:
1692
+ - collection:
1693
+ id: &collection collection
1694
+ database: *database
1695
+ collectionName: *collectionName
1696
+ collectionOptions:
1697
+ timeoutMS: 0
1698
+ - name: failPoint
1699
+ object: testRunner
1700
+ arguments:
1701
+ client: *failPointClient
1702
+ failPoint:
1703
+ configureFailPoint: failCommand
1704
+ mode: { times: 1 }
1705
+ data:
1706
+ failCommands: ["createIndexes"]
1707
+ blockConnection: true
1708
+ blockTimeMS: 15
1709
+ - name: createIndex
1710
+ object: *collection
1711
+ arguments:
1712
+ keys: { x: 1 }
1713
+ name: "x_1"
1714
+
1715
+
1716
+ expectEvents:
1717
+ - client: *client
1718
+ events:
1719
+ - commandStartedEvent:
1720
+ commandName: createIndexes
1721
+ databaseName: *databaseName
1722
+ command:
1723
+ createIndexes: *collectionName
1724
+ maxTimeMS: { $$exists: false }
1725
+ - description: "timeoutMS can be configured on a MongoCollection - dropIndex on collection"
1726
+ operations:
1727
+ - name: createEntities
1728
+ object: testRunner
1729
+ arguments:
1730
+ entities:
1731
+ - collection:
1732
+ id: &collection collection
1733
+ database: *database
1734
+ collectionName: *collectionName
1735
+ collectionOptions:
1736
+ timeoutMS: 1000
1737
+ - name: failPoint
1738
+ object: testRunner
1739
+ arguments:
1740
+ client: *failPointClient
1741
+ failPoint:
1742
+ configureFailPoint: failCommand
1743
+ mode: { times: 1 }
1744
+ data:
1745
+ failCommands: ["dropIndexes"]
1746
+ blockConnection: true
1747
+ blockTimeMS: 15
1748
+ - name: dropIndex
1749
+ object: *collection
1750
+ arguments:
1751
+ name: "x_1"
1752
+
1753
+ expectError:
1754
+ isClientError: false
1755
+ isTimeoutError: false
1756
+ expectEvents:
1757
+ - client: *client
1758
+ events:
1759
+ - commandStartedEvent:
1760
+ commandName: dropIndexes
1761
+ databaseName: *databaseName
1762
+ command:
1763
+ dropIndexes: *collectionName
1764
+ maxTimeMS: { $$type: ["int", "long"] }
1765
+ - description: "timeoutMS can be set to 0 on a MongoCollection - dropIndex on collection"
1766
+ operations:
1767
+ - name: createEntities
1768
+ object: testRunner
1769
+ arguments:
1770
+ entities:
1771
+ - collection:
1772
+ id: &collection collection
1773
+ database: *database
1774
+ collectionName: *collectionName
1775
+ collectionOptions:
1776
+ timeoutMS: 0
1777
+ - name: failPoint
1778
+ object: testRunner
1779
+ arguments:
1780
+ client: *failPointClient
1781
+ failPoint:
1782
+ configureFailPoint: failCommand
1783
+ mode: { times: 1 }
1784
+ data:
1785
+ failCommands: ["dropIndexes"]
1786
+ blockConnection: true
1787
+ blockTimeMS: 15
1788
+ - name: dropIndex
1789
+ object: *collection
1790
+ arguments:
1791
+ name: "x_1"
1792
+
1793
+ expectError:
1794
+ isClientError: false
1795
+ isTimeoutError: false
1796
+ expectEvents:
1797
+ - client: *client
1798
+ events:
1799
+ - commandStartedEvent:
1800
+ commandName: dropIndexes
1801
+ databaseName: *databaseName
1802
+ command:
1803
+ dropIndexes: *collectionName
1804
+ maxTimeMS: { $$exists: false }
1805
+ - description: "timeoutMS can be configured on a MongoCollection - dropIndexes on collection"
1806
+ operations:
1807
+ - name: createEntities
1808
+ object: testRunner
1809
+ arguments:
1810
+ entities:
1811
+ - collection:
1812
+ id: &collection collection
1813
+ database: *database
1814
+ collectionName: *collectionName
1815
+ collectionOptions:
1816
+ timeoutMS: 1000
1817
+ - name: failPoint
1818
+ object: testRunner
1819
+ arguments:
1820
+ client: *failPointClient
1821
+ failPoint:
1822
+ configureFailPoint: failCommand
1823
+ mode: { times: 1 }
1824
+ data:
1825
+ failCommands: ["dropIndexes"]
1826
+ blockConnection: true
1827
+ blockTimeMS: 15
1828
+ - name: dropIndexes
1829
+ object: *collection
1830
+
1831
+
1832
+ expectEvents:
1833
+ - client: *client
1834
+ events:
1835
+ - commandStartedEvent:
1836
+ commandName: dropIndexes
1837
+ databaseName: *databaseName
1838
+ command:
1839
+ dropIndexes: *collectionName
1840
+ maxTimeMS: { $$type: ["int", "long"] }
1841
+ - description: "timeoutMS can be set to 0 on a MongoCollection - dropIndexes on collection"
1842
+ operations:
1843
+ - name: createEntities
1844
+ object: testRunner
1845
+ arguments:
1846
+ entities:
1847
+ - collection:
1848
+ id: &collection collection
1849
+ database: *database
1850
+ collectionName: *collectionName
1851
+ collectionOptions:
1852
+ timeoutMS: 0
1853
+ - name: failPoint
1854
+ object: testRunner
1855
+ arguments:
1856
+ client: *failPointClient
1857
+ failPoint:
1858
+ configureFailPoint: failCommand
1859
+ mode: { times: 1 }
1860
+ data:
1861
+ failCommands: ["dropIndexes"]
1862
+ blockConnection: true
1863
+ blockTimeMS: 15
1864
+ - name: dropIndexes
1865
+ object: *collection
1866
+
1867
+
1868
+ expectEvents:
1869
+ - client: *client
1870
+ events:
1871
+ - commandStartedEvent:
1872
+ commandName: dropIndexes
1873
+ databaseName: *databaseName
1874
+ command:
1875
+ dropIndexes: *collectionName
1876
+ maxTimeMS: { $$exists: false }
1877
+