mongo 2.17.4 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1580) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +70 -37
  3. data/Rakefile +87 -177
  4. data/bin/mongo_console +2 -0
  5. data/lib/mongo/active_support.rb +1 -1
  6. data/lib/mongo/address/ipv4.rb +1 -1
  7. data/lib/mongo/address/ipv6.rb +1 -1
  8. data/lib/mongo/address/unix.rb +1 -1
  9. data/lib/mongo/address/validator.rb +1 -1
  10. data/lib/mongo/address.rb +23 -4
  11. data/lib/mongo/auth/aws/conversation.rb +1 -5
  12. data/lib/mongo/{operation/drop_database/command.rb → auth/aws/credentials.rb} +15 -18
  13. data/lib/mongo/auth/aws/credentials_cache.rb +75 -0
  14. data/lib/mongo/auth/aws/credentials_retriever.rb +232 -44
  15. data/lib/mongo/auth/aws/request.rb +1 -2
  16. data/lib/mongo/auth/aws.rb +6 -6
  17. data/lib/mongo/auth/base.rb +9 -2
  18. data/lib/mongo/auth/conversation_base.rb +1 -1
  19. data/lib/mongo/auth/cr/conversation.rb +1 -1
  20. data/lib/mongo/auth/cr.rb +1 -1
  21. data/lib/mongo/auth/credential_cache.rb +1 -1
  22. data/lib/mongo/auth/gssapi/conversation.rb +1 -1
  23. data/lib/mongo/auth/gssapi.rb +1 -1
  24. data/lib/mongo/auth/ldap/conversation.rb +1 -1
  25. data/lib/mongo/auth/ldap.rb +1 -1
  26. data/lib/mongo/auth/roles.rb +17 -17
  27. data/lib/mongo/auth/sasl_conversation_base.rb +1 -1
  28. data/lib/mongo/auth/scram/conversation.rb +1 -1
  29. data/lib/mongo/auth/scram.rb +1 -1
  30. data/lib/mongo/auth/scram256/conversation.rb +1 -1
  31. data/lib/mongo/auth/scram256.rb +1 -1
  32. data/lib/mongo/auth/scram_conversation_base.rb +1 -1
  33. data/lib/mongo/auth/stringprep/profiles/sasl.rb +1 -1
  34. data/lib/mongo/auth/stringprep/tables.rb +1 -1
  35. data/lib/mongo/auth/stringprep/unicode_normalize/normalize.rb +1 -1
  36. data/lib/mongo/auth/stringprep/unicode_normalize/tables.rb +2 -1
  37. data/lib/mongo/auth/stringprep.rb +1 -1
  38. data/lib/mongo/auth/user/view.rb +1 -1
  39. data/lib/mongo/auth/user.rb +1 -1
  40. data/lib/mongo/auth/x509/conversation.rb +1 -1
  41. data/lib/mongo/auth/x509.rb +1 -1
  42. data/lib/mongo/auth.rb +13 -2
  43. data/lib/mongo/background_thread.rb +1 -1
  44. data/lib/mongo/bson.rb +1 -1
  45. data/lib/mongo/bulk_write/combineable.rb +1 -1
  46. data/lib/mongo/bulk_write/ordered_combiner.rb +1 -1
  47. data/lib/mongo/bulk_write/result.rb +11 -2
  48. data/lib/mongo/bulk_write/result_combiner.rb +3 -5
  49. data/lib/mongo/bulk_write/transformable.rb +1 -1
  50. data/lib/mongo/bulk_write/unordered_combiner.rb +1 -1
  51. data/lib/mongo/bulk_write/validatable.rb +1 -1
  52. data/lib/mongo/bulk_write.rb +152 -31
  53. data/lib/mongo/caching_cursor.rb +1 -1
  54. data/lib/mongo/client.rb +223 -27
  55. data/lib/mongo/client_encryption.rb +218 -11
  56. data/lib/mongo/cluster/periodic_executor.rb +1 -1
  57. data/lib/mongo/cluster/reapers/cursor_reaper.rb +14 -3
  58. data/lib/mongo/cluster/reapers/socket_reaper.rb +2 -2
  59. data/lib/mongo/cluster/sdam_flow.rb +62 -22
  60. data/lib/mongo/cluster/topology/base.rb +17 -1
  61. data/lib/mongo/cluster/topology/load_balanced.rb +1 -1
  62. data/lib/mongo/cluster/topology/no_replica_set_options.rb +1 -1
  63. data/lib/mongo/cluster/topology/replica_set_no_primary.rb +1 -1
  64. data/lib/mongo/cluster/topology/replica_set_with_primary.rb +1 -1
  65. data/lib/mongo/cluster/topology/sharded.rb +1 -1
  66. data/lib/mongo/cluster/topology/single.rb +1 -1
  67. data/lib/mongo/cluster/topology/unknown.rb +1 -1
  68. data/lib/mongo/cluster/topology.rb +1 -1
  69. data/lib/mongo/cluster.rb +95 -44
  70. data/lib/mongo/cluster_time.rb +1 -1
  71. data/lib/mongo/collection/helpers.rb +43 -0
  72. data/lib/mongo/collection/queryable_encryption.rb +162 -0
  73. data/lib/mongo/collection/view/aggregation/behavior.rb +131 -0
  74. data/lib/mongo/collection/view/aggregation.rb +51 -111
  75. data/lib/mongo/collection/view/builder/aggregation.rb +2 -8
  76. data/lib/mongo/collection/view/builder/map_reduce.rb +1 -1
  77. data/lib/mongo/collection/view/builder.rb +1 -1
  78. data/lib/mongo/collection/view/change_stream/retryable.rb +1 -1
  79. data/lib/mongo/collection/view/change_stream.rb +143 -48
  80. data/lib/mongo/collection/view/explainable.rb +2 -2
  81. data/lib/mongo/collection/view/immutable.rb +1 -1
  82. data/lib/mongo/collection/view/iterable.rb +79 -62
  83. data/lib/mongo/collection/view/map_reduce.rb +41 -15
  84. data/lib/mongo/collection/view/readable.rb +114 -62
  85. data/lib/mongo/collection/view/writable.rb +222 -70
  86. data/lib/mongo/collection/view.rb +44 -4
  87. data/lib/mongo/collection.rb +463 -114
  88. data/lib/mongo/condition_variable.rb +58 -0
  89. data/lib/mongo/config/options.rb +63 -0
  90. data/lib/mongo/config/validators/option.rb +27 -0
  91. data/lib/mongo/config.rb +43 -0
  92. data/lib/mongo/crypt/auto_decryption_context.rb +1 -1
  93. data/lib/mongo/crypt/auto_encrypter.rb +142 -20
  94. data/lib/mongo/crypt/auto_encryption_context.rb +1 -1
  95. data/lib/mongo/crypt/binary.rb +1 -1
  96. data/lib/mongo/crypt/binding.rb +715 -152
  97. data/lib/mongo/crypt/context.rb +83 -11
  98. data/lib/mongo/crypt/data_key_context.rb +13 -105
  99. data/lib/mongo/crypt/encryption_io.rb +133 -69
  100. data/lib/mongo/crypt/explicit_decryption_context.rb +1 -1
  101. data/lib/mongo/crypt/explicit_encrypter.rb +266 -34
  102. data/lib/mongo/crypt/explicit_encryption_context.rb +82 -22
  103. data/lib/mongo/{operation/kill_cursors/legacy.rb → crypt/explicit_encryption_expression_context.rb} +9 -20
  104. data/lib/mongo/crypt/handle.rb +169 -87
  105. data/lib/mongo/crypt/hooks.rb +26 -3
  106. data/lib/mongo/crypt/kms/aws/credentials.rb +83 -0
  107. data/lib/mongo/crypt/kms/aws/master_document.rb +78 -0
  108. data/lib/mongo/crypt/kms/aws.rb +20 -0
  109. data/lib/mongo/crypt/kms/azure/access_token.rb +54 -0
  110. data/lib/mongo/crypt/kms/azure/credentials.rb +103 -0
  111. data/lib/mongo/crypt/kms/azure/credentials_retriever.rb +138 -0
  112. data/lib/mongo/crypt/kms/azure/master_document.rb +79 -0
  113. data/lib/mongo/crypt/kms/azure.rb +21 -0
  114. data/lib/mongo/crypt/kms/credentials.rb +96 -0
  115. data/lib/mongo/crypt/kms/gcp/credentials.rb +127 -0
  116. data/lib/mongo/crypt/kms/gcp/credentials_retriever.rb +83 -0
  117. data/lib/mongo/crypt/kms/gcp/master_document.rb +99 -0
  118. data/lib/mongo/crypt/kms/gcp.rb +21 -0
  119. data/lib/mongo/crypt/kms/kmip/credentials.rb +68 -0
  120. data/lib/mongo/crypt/kms/kmip/master_document.rb +74 -0
  121. data/lib/mongo/crypt/kms/kmip.rb +19 -0
  122. data/lib/mongo/crypt/kms/local/credentials.rb +65 -0
  123. data/lib/mongo/crypt/kms/local/master_document.rb +43 -0
  124. data/lib/mongo/crypt/kms/local.rb +19 -0
  125. data/lib/mongo/crypt/kms/master_key_document.rb +65 -0
  126. data/lib/mongo/crypt/kms.rb +122 -0
  127. data/lib/mongo/crypt/kms_context.rb +1 -1
  128. data/lib/mongo/crypt/rewrap_many_data_key_context.rb +46 -0
  129. data/lib/mongo/crypt/rewrap_many_data_key_result.rb +37 -0
  130. data/lib/mongo/crypt/status.rb +9 -3
  131. data/lib/mongo/crypt.rb +16 -1
  132. data/lib/mongo/csot_timeout_holder.rb +119 -0
  133. data/lib/mongo/cursor/kill_spec.rb +31 -7
  134. data/lib/mongo/cursor/nontailable.rb +27 -0
  135. data/lib/mongo/cursor.rb +141 -35
  136. data/lib/mongo/cursor_host.rb +82 -0
  137. data/lib/mongo/database/view.rb +123 -16
  138. data/lib/mongo/database.rb +149 -35
  139. data/lib/mongo/dbref.rb +2 -106
  140. data/lib/mongo/distinguishing_semaphore.rb +2 -2
  141. data/lib/mongo/error/auth_error.rb +1 -1
  142. data/lib/mongo/error/bad_load_balancer_target.rb +1 -1
  143. data/lib/mongo/error/bulk_write_error.rb +32 -5
  144. data/lib/mongo/error/change_stream_resumable.rb +1 -1
  145. data/lib/mongo/error/client_closed.rb +24 -0
  146. data/lib/mongo/error/closed_stream.rb +1 -1
  147. data/lib/mongo/error/connection_check_out_timeout.rb +1 -1
  148. data/lib/mongo/error/connection_perished.rb +3 -1
  149. data/lib/mongo/error/connection_unavailable.rb +27 -0
  150. data/lib/mongo/error/credential_check_error.rb +1 -1
  151. data/lib/mongo/error/crypt_error.rb +1 -1
  152. data/lib/mongo/error/extra_file_chunk.rb +1 -1
  153. data/lib/mongo/error/failed_string_prep_validation.rb +1 -1
  154. data/lib/mongo/error/file_not_found.rb +1 -1
  155. data/lib/mongo/error/handshake_error.rb +1 -1
  156. data/lib/mongo/error/insufficient_iteration_count.rb +1 -1
  157. data/lib/mongo/error/internal_driver_error.rb +1 -1
  158. data/lib/mongo/error/invalid_address.rb +1 -1
  159. data/lib/mongo/error/invalid_application_name.rb +1 -1
  160. data/lib/mongo/error/invalid_bulk_operation.rb +1 -1
  161. data/lib/mongo/error/invalid_bulk_operation_type.rb +1 -1
  162. data/lib/mongo/error/invalid_collection_name.rb +1 -1
  163. data/lib/mongo/error/invalid_config_option.rb +21 -0
  164. data/lib/mongo/error/invalid_cursor_operation.rb +1 -1
  165. data/lib/mongo/error/invalid_database_name.rb +1 -1
  166. data/lib/mongo/error/invalid_document.rb +1 -1
  167. data/lib/mongo/error/invalid_file.rb +1 -1
  168. data/lib/mongo/error/invalid_file_revision.rb +1 -1
  169. data/lib/mongo/{operation/drop/command.rb → error/invalid_max_connecting.rb} +8 -21
  170. data/lib/mongo/error/invalid_min_pool_size.rb +1 -1
  171. data/lib/mongo/error/invalid_nonce.rb +1 -1
  172. data/lib/mongo/error/invalid_read_concern.rb +1 -1
  173. data/lib/mongo/error/invalid_read_option.rb +2 -2
  174. data/lib/mongo/error/invalid_replacement_document.rb +28 -10
  175. data/lib/mongo/error/invalid_server_auth_host.rb +1 -1
  176. data/lib/mongo/error/invalid_server_auth_response.rb +1 -1
  177. data/lib/mongo/error/invalid_server_preference.rb +1 -1
  178. data/lib/mongo/error/invalid_session.rb +1 -1
  179. data/lib/mongo/error/invalid_signature.rb +1 -1
  180. data/lib/mongo/error/invalid_transaction_operation.rb +1 -1
  181. data/lib/mongo/error/invalid_txt_record.rb +1 -1
  182. data/lib/mongo/error/invalid_update_document.rb +28 -8
  183. data/lib/mongo/error/invalid_uri.rb +1 -1
  184. data/lib/mongo/error/invalid_write_concern.rb +1 -1
  185. data/lib/mongo/error/kms_error.rb +1 -1
  186. data/lib/mongo/error/labelable.rb +72 -0
  187. data/lib/mongo/error/lint_error.rb +1 -1
  188. data/lib/mongo/error/max_bson_size.rb +1 -1
  189. data/lib/mongo/error/max_message_size.rb +1 -1
  190. data/lib/mongo/error/mismatched_domain.rb +1 -1
  191. data/lib/mongo/error/missing_connection.rb +27 -0
  192. data/lib/mongo/error/missing_file_chunk.rb +9 -3
  193. data/lib/mongo/error/missing_password.rb +1 -1
  194. data/lib/mongo/error/missing_resume_token.rb +1 -1
  195. data/lib/mongo/error/missing_scram_server_signature.rb +1 -1
  196. data/lib/mongo/error/missing_service_id.rb +1 -1
  197. data/lib/mongo/error/mongocryptd_spawn_error.rb +1 -1
  198. data/lib/mongo/error/multi_index_drop.rb +1 -1
  199. data/lib/mongo/error/need_primary_server.rb +1 -1
  200. data/lib/mongo/error/no_server_available.rb +1 -1
  201. data/lib/mongo/error/no_service_connection_available.rb +1 -1
  202. data/lib/mongo/error/no_srv_records.rb +1 -1
  203. data/lib/mongo/error/notable.rb +15 -1
  204. data/lib/mongo/error/operation_failure.rb +213 -260
  205. data/lib/mongo/error/parser.rb +1 -1
  206. data/lib/mongo/{operation/create_user/command.rb → error/pool_cleared_error.rb} +17 -23
  207. data/lib/mongo/error/pool_closed_error.rb +4 -17
  208. data/lib/mongo/{operation/update_user/command.rb → error/pool_error.rb} +21 -21
  209. data/lib/mongo/{operation/drop_index/command.rb → error/pool_paused_error.rb} +17 -22
  210. data/lib/mongo/error/raise_original_error.rb +1 -1
  211. data/lib/mongo/error/read_write_retryable.rb +108 -0
  212. data/lib/mongo/error/sdam_error_detection.rb +1 -1
  213. data/lib/mongo/error/server_api_conflict.rb +1 -1
  214. data/lib/mongo/error/server_api_not_supported.rb +1 -1
  215. data/lib/mongo/error/server_certificate_revoked.rb +1 -1
  216. data/lib/mongo/{operation/get_more/legacy.rb → error/server_not_usable.rb} +13 -16
  217. data/lib/mongo/error/server_timeout_error.rb +12 -0
  218. data/lib/mongo/error/session_ended.rb +1 -1
  219. data/lib/mongo/{operation/command/command.rb → error/session_not_materialized.rb} +8 -20
  220. data/lib/mongo/error/sessions_not_supported.rb +1 -1
  221. data/lib/mongo/error/snapshot_session_invalid_server_version.rb +1 -1
  222. data/lib/mongo/error/snapshot_session_transaction_prohibited.rb +1 -1
  223. data/lib/mongo/error/socket_error.rb +1 -1
  224. data/lib/mongo/error/socket_timeout_error.rb +4 -2
  225. data/lib/mongo/error/timeout_error.rb +23 -0
  226. data/lib/mongo/{operation/shared/op_msg_or_command.rb → error/transactions_not_supported.rb} +13 -20
  227. data/lib/mongo/error/unchangeable_collection_option.rb +1 -1
  228. data/lib/mongo/error/unexpected_chunk_length.rb +1 -1
  229. data/lib/mongo/error/unexpected_response.rb +1 -1
  230. data/lib/mongo/error/unknown_payload_type.rb +1 -1
  231. data/lib/mongo/error/unmet_dependency.rb +1 -1
  232. data/lib/mongo/error/unsupported_array_filters.rb +1 -1
  233. data/lib/mongo/error/unsupported_collation.rb +1 -1
  234. data/lib/mongo/error/unsupported_features.rb +1 -1
  235. data/lib/mongo/error/unsupported_message_type.rb +1 -1
  236. data/lib/mongo/error/unsupported_option.rb +1 -1
  237. data/lib/mongo/error/write_retryable.rb +1 -1
  238. data/lib/mongo/error.rb +16 -38
  239. data/lib/mongo/event/base.rb +1 -1
  240. data/lib/mongo/event/listeners.rb +1 -1
  241. data/lib/mongo/event/publisher.rb +1 -1
  242. data/lib/mongo/event/subscriber.rb +1 -1
  243. data/lib/mongo/event.rb +1 -1
  244. data/lib/mongo/grid/file/chunk.rb +3 -2
  245. data/lib/mongo/grid/file/info.rb +3 -2
  246. data/lib/mongo/grid/file.rb +1 -1
  247. data/lib/mongo/grid/fs_bucket.rb +49 -10
  248. data/lib/mongo/grid/stream/read.rb +22 -2
  249. data/lib/mongo/grid/stream/write.rb +22 -5
  250. data/lib/mongo/grid/stream.rb +1 -1
  251. data/lib/mongo/grid.rb +1 -1
  252. data/lib/mongo/id.rb +1 -1
  253. data/lib/mongo/index/view.rb +96 -19
  254. data/lib/mongo/index.rb +1 -1
  255. data/lib/mongo/lint.rb +1 -1
  256. data/lib/mongo/loggable.rb +3 -3
  257. data/lib/mongo/logger.rb +1 -1
  258. data/lib/mongo/monitoring/cmap_log_subscriber.rb +1 -1
  259. data/lib/mongo/monitoring/command_log_subscriber.rb +1 -1
  260. data/lib/mongo/monitoring/event/cmap/base.rb +1 -1
  261. data/lib/mongo/monitoring/event/cmap/connection_check_out_failed.rb +1 -1
  262. data/lib/mongo/monitoring/event/cmap/connection_check_out_started.rb +1 -1
  263. data/lib/mongo/monitoring/event/cmap/connection_checked_in.rb +1 -1
  264. data/lib/mongo/monitoring/event/cmap/connection_checked_out.rb +1 -1
  265. data/lib/mongo/monitoring/event/cmap/connection_closed.rb +1 -1
  266. data/lib/mongo/monitoring/event/cmap/connection_created.rb +1 -1
  267. data/lib/mongo/monitoring/event/cmap/connection_ready.rb +1 -1
  268. data/lib/mongo/monitoring/event/cmap/pool_cleared.rb +9 -2
  269. data/lib/mongo/monitoring/event/cmap/pool_closed.rb +1 -1
  270. data/lib/mongo/monitoring/event/cmap/pool_created.rb +1 -1
  271. data/lib/mongo/monitoring/event/cmap/pool_ready.rb +67 -0
  272. data/lib/mongo/monitoring/event/cmap.rb +2 -1
  273. data/lib/mongo/monitoring/event/command_failed.rb +9 -3
  274. data/lib/mongo/monitoring/event/command_started.rb +2 -2
  275. data/lib/mongo/monitoring/event/command_succeeded.rb +10 -3
  276. data/lib/mongo/monitoring/event/secure.rb +2 -2
  277. data/lib/mongo/monitoring/event/server_closed.rb +1 -1
  278. data/lib/mongo/monitoring/event/server_description_changed.rb +1 -1
  279. data/lib/mongo/monitoring/event/server_heartbeat_failed.rb +1 -1
  280. data/lib/mongo/monitoring/event/server_heartbeat_started.rb +1 -1
  281. data/lib/mongo/monitoring/event/server_heartbeat_succeeded.rb +1 -1
  282. data/lib/mongo/monitoring/event/server_opening.rb +1 -1
  283. data/lib/mongo/monitoring/event/topology_changed.rb +1 -1
  284. data/lib/mongo/monitoring/event/topology_closed.rb +1 -1
  285. data/lib/mongo/monitoring/event/topology_opening.rb +1 -1
  286. data/lib/mongo/monitoring/event.rb +1 -1
  287. data/lib/mongo/monitoring/publishable.rb +10 -6
  288. data/lib/mongo/monitoring/sdam_log_subscriber.rb +1 -1
  289. data/lib/mongo/monitoring/server_closed_log_subscriber.rb +1 -1
  290. data/lib/mongo/monitoring/server_description_changed_log_subscriber.rb +1 -1
  291. data/lib/mongo/monitoring/server_opening_log_subscriber.rb +1 -1
  292. data/lib/mongo/monitoring/topology_changed_log_subscriber.rb +1 -1
  293. data/lib/mongo/monitoring/topology_closed_log_subscriber.rb +1 -1
  294. data/lib/mongo/monitoring/topology_opening_log_subscriber.rb +1 -1
  295. data/lib/mongo/monitoring/unified_sdam_log_subscriber.rb +1 -1
  296. data/lib/mongo/monitoring.rb +1 -1
  297. data/lib/mongo/operation/aggregate/op_msg.rb +1 -1
  298. data/lib/mongo/operation/aggregate/result.rb +1 -1
  299. data/lib/mongo/operation/aggregate.rb +2 -3
  300. data/lib/mongo/operation/collections_info/result.rb +6 -3
  301. data/lib/mongo/operation/collections_info.rb +4 -16
  302. data/lib/mongo/operation/command/op_msg.rb +7 -1
  303. data/lib/mongo/operation/command.rb +2 -3
  304. data/lib/mongo/operation/context.rb +64 -8
  305. data/lib/mongo/operation/count/op_msg.rb +5 -2
  306. data/lib/mongo/operation/count.rb +2 -3
  307. data/lib/mongo/operation/create/op_msg.rb +5 -2
  308. data/lib/mongo/operation/create.rb +2 -3
  309. data/lib/mongo/operation/create_index/op_msg.rb +3 -2
  310. data/lib/mongo/operation/create_index.rb +2 -3
  311. data/lib/mongo/operation/create_search_indexes/op_msg.rb +31 -0
  312. data/lib/mongo/operation/create_search_indexes.rb +15 -0
  313. data/lib/mongo/operation/create_user/op_msg.rb +1 -1
  314. data/lib/mongo/operation/create_user.rb +2 -3
  315. data/lib/mongo/operation/delete/bulk_result.rb +1 -1
  316. data/lib/mongo/operation/delete/op_msg.rb +4 -2
  317. data/lib/mongo/operation/delete/result.rb +1 -1
  318. data/lib/mongo/operation/delete.rb +1 -3
  319. data/lib/mongo/operation/distinct/op_msg.rb +5 -2
  320. data/lib/mongo/operation/distinct.rb +2 -3
  321. data/lib/mongo/operation/drop/op_msg.rb +1 -1
  322. data/lib/mongo/operation/drop.rb +2 -3
  323. data/lib/mongo/operation/drop_database/op_msg.rb +1 -1
  324. data/lib/mongo/operation/drop_database.rb +2 -3
  325. data/lib/mongo/operation/drop_index/op_msg.rb +6 -2
  326. data/lib/mongo/operation/drop_index.rb +2 -3
  327. data/lib/mongo/operation/drop_search_index/op_msg.rb +33 -0
  328. data/lib/mongo/operation/drop_search_index.rb +15 -0
  329. data/lib/mongo/operation/explain/op_msg.rb +1 -1
  330. data/lib/mongo/operation/explain/result.rb +1 -1
  331. data/lib/mongo/operation/explain.rb +2 -4
  332. data/lib/mongo/operation/find/builder/command.rb +1 -1
  333. data/lib/mongo/operation/find/builder/flags.rb +1 -1
  334. data/lib/mongo/operation/find/builder/modifiers.rb +1 -1
  335. data/lib/mongo/operation/find/builder.rb +1 -2
  336. data/lib/mongo/operation/find/op_msg.rb +46 -1
  337. data/lib/mongo/operation/find/result.rb +1 -1
  338. data/lib/mongo/operation/find.rb +2 -4
  339. data/lib/mongo/operation/get_more/command_builder.rb +6 -2
  340. data/lib/mongo/operation/get_more/op_msg.rb +34 -1
  341. data/lib/mongo/operation/get_more/result.rb +1 -1
  342. data/lib/mongo/operation/get_more.rb +2 -4
  343. data/lib/mongo/operation/indexes/op_msg.rb +1 -1
  344. data/lib/mongo/operation/indexes/result.rb +1 -1
  345. data/lib/mongo/operation/indexes.rb +2 -18
  346. data/lib/mongo/operation/insert/bulk_result.rb +6 -2
  347. data/lib/mongo/operation/insert/op_msg.rb +9 -5
  348. data/lib/mongo/operation/insert/result.rb +9 -4
  349. data/lib/mongo/operation/insert.rb +1 -3
  350. data/lib/mongo/operation/kill_cursors/command_builder.rb +1 -1
  351. data/lib/mongo/operation/kill_cursors/op_msg.rb +1 -1
  352. data/lib/mongo/operation/kill_cursors.rb +2 -4
  353. data/lib/mongo/operation/list_collections/op_msg.rb +5 -2
  354. data/lib/mongo/operation/list_collections/result.rb +2 -2
  355. data/lib/mongo/operation/list_collections.rb +2 -3
  356. data/lib/mongo/operation/map_reduce/op_msg.rb +1 -1
  357. data/lib/mongo/operation/map_reduce/result.rb +18 -2
  358. data/lib/mongo/operation/map_reduce.rb +2 -3
  359. data/lib/mongo/operation/op_msg_base.rb +4 -2
  360. data/lib/mongo/operation/parallel_scan/op_msg.rb +1 -1
  361. data/lib/mongo/operation/parallel_scan/result.rb +1 -1
  362. data/lib/mongo/operation/parallel_scan.rb +2 -3
  363. data/lib/mongo/operation/remove_user/op_msg.rb +1 -1
  364. data/lib/mongo/operation/remove_user.rb +2 -3
  365. data/lib/mongo/operation/result.rb +47 -10
  366. data/lib/mongo/operation/shared/bypass_document_validation.rb +1 -1
  367. data/lib/mongo/operation/shared/causal_consistency_supported.rb +1 -1
  368. data/lib/mongo/operation/shared/executable.rb +60 -18
  369. data/lib/mongo/operation/shared/executable_no_validate.rb +1 -1
  370. data/lib/mongo/operation/shared/executable_transaction_label.rb +1 -1
  371. data/lib/mongo/operation/shared/idable.rb +1 -1
  372. data/lib/mongo/operation/shared/limited.rb +1 -1
  373. data/lib/mongo/operation/shared/object_id_generator.rb +1 -1
  374. data/lib/mongo/operation/shared/{polymorphic_operation.rb → op_msg_executable.rb} +28 -8
  375. data/lib/mongo/operation/shared/polymorphic_lookup.rb +1 -1
  376. data/lib/mongo/operation/shared/polymorphic_result.rb +1 -1
  377. data/lib/mongo/operation/shared/read_preference_supported.rb +1 -1
  378. data/lib/mongo/operation/shared/response_handling.rb +32 -33
  379. data/lib/mongo/operation/shared/result/aggregatable.rb +1 -1
  380. data/lib/mongo/operation/shared/result/use_legacy_error_parser.rb +1 -1
  381. data/lib/mongo/operation/shared/sessions_supported.rb +2 -3
  382. data/lib/mongo/operation/shared/specifiable.rb +8 -1
  383. data/lib/mongo/operation/shared/timed.rb +52 -0
  384. data/lib/mongo/operation/shared/validatable.rb +1 -1
  385. data/lib/mongo/operation/shared/write.rb +22 -13
  386. data/lib/mongo/operation/shared/write_concern_supported.rb +1 -1
  387. data/lib/mongo/operation/update/bulk_result.rb +1 -1
  388. data/lib/mongo/operation/update/op_msg.rb +5 -3
  389. data/lib/mongo/operation/update/result.rb +1 -1
  390. data/lib/mongo/operation/update.rb +1 -3
  391. data/lib/mongo/operation/update_search_index/op_msg.rb +34 -0
  392. data/lib/mongo/operation/update_search_index.rb +15 -0
  393. data/lib/mongo/operation/update_user/op_msg.rb +1 -1
  394. data/lib/mongo/operation/update_user.rb +2 -3
  395. data/lib/mongo/operation/users_info/op_msg.rb +1 -1
  396. data/lib/mongo/operation/users_info/result.rb +1 -1
  397. data/lib/mongo/operation/users_info.rb +2 -3
  398. data/lib/mongo/operation/write_command/op_msg.rb +1 -1
  399. data/lib/mongo/operation/write_command.rb +2 -3
  400. data/lib/mongo/operation.rb +6 -4
  401. data/lib/mongo/options/mapper.rb +1 -1
  402. data/lib/mongo/options/redacted.rb +1 -1
  403. data/lib/mongo/options.rb +1 -1
  404. data/lib/mongo/protocol/bit_vector.rb +4 -2
  405. data/lib/mongo/protocol/caching_hash.rb +52 -0
  406. data/lib/mongo/protocol/compressed.rb +1 -1
  407. data/lib/mongo/protocol/get_more.rb +1 -1
  408. data/lib/mongo/protocol/kill_cursors.rb +1 -1
  409. data/lib/mongo/protocol/message.rb +6 -13
  410. data/lib/mongo/protocol/msg.rb +25 -4
  411. data/lib/mongo/protocol/query.rb +1 -1
  412. data/lib/mongo/protocol/registry.rb +1 -1
  413. data/lib/mongo/protocol/reply.rb +1 -1
  414. data/lib/mongo/protocol/serializers.rb +25 -18
  415. data/lib/mongo/protocol.rb +2 -4
  416. data/lib/mongo/query_cache.rb +36 -21
  417. data/lib/mongo/retryable/base_worker.rb +116 -0
  418. data/lib/mongo/retryable/read_worker.rb +338 -0
  419. data/lib/mongo/retryable/write_worker.rb +398 -0
  420. data/lib/mongo/retryable.rb +37 -454
  421. data/lib/mongo/search_index/view.rb +232 -0
  422. data/lib/mongo/semaphore.rb +2 -2
  423. data/lib/mongo/server/app_metadata/environment.rb +314 -0
  424. data/lib/mongo/server/app_metadata/platform.rb +114 -0
  425. data/lib/mongo/server/app_metadata/truncator.rb +142 -0
  426. data/lib/mongo/server/app_metadata.rb +76 -108
  427. data/lib/mongo/server/connection.rb +102 -22
  428. data/lib/mongo/server/connection_base.rb +25 -3
  429. data/lib/mongo/server/connection_common.rb +5 -2
  430. data/lib/mongo/server/connection_pool/generation_manager.rb +56 -12
  431. data/lib/mongo/server/connection_pool/populator.rb +33 -31
  432. data/lib/mongo/server/connection_pool.rb +758 -251
  433. data/lib/mongo/server/description/features.rb +5 -2
  434. data/lib/mongo/server/description/load_balancer.rb +1 -1
  435. data/lib/mongo/server/description.rb +32 -13
  436. data/lib/mongo/server/monitor/app_metadata.rb +1 -1
  437. data/lib/mongo/server/monitor/connection.rb +2 -1
  438. data/lib/mongo/server/monitor.rb +43 -24
  439. data/lib/mongo/server/pending_connection.rb +26 -9
  440. data/lib/mongo/server/push_monitor/connection.rb +1 -1
  441. data/lib/mongo/server/push_monitor.rb +14 -4
  442. data/lib/mongo/server/{round_trip_time_averager.rb → round_trip_time_calculator.rb} +26 -8
  443. data/lib/mongo/server.rb +114 -39
  444. data/lib/mongo/server_selector/base.rb +75 -12
  445. data/lib/mongo/server_selector/nearest.rb +1 -1
  446. data/lib/mongo/server_selector/primary.rb +1 -1
  447. data/lib/mongo/server_selector/primary_preferred.rb +1 -1
  448. data/lib/mongo/server_selector/secondary.rb +1 -1
  449. data/lib/mongo/server_selector/secondary_preferred.rb +1 -1
  450. data/lib/mongo/server_selector.rb +1 -1
  451. data/lib/mongo/session/server_session/dirtyable.rb +52 -0
  452. data/lib/mongo/session/server_session.rb +4 -1
  453. data/lib/mongo/session/session_pool.rb +21 -19
  454. data/lib/mongo/session.rb +221 -44
  455. data/lib/mongo/socket/ocsp_cache.rb +1 -1
  456. data/lib/mongo/socket/ocsp_verifier.rb +5 -6
  457. data/lib/mongo/socket/ssl.rb +132 -19
  458. data/lib/mongo/socket/tcp.rb +44 -7
  459. data/lib/mongo/socket/unix.rb +1 -1
  460. data/lib/mongo/socket.rb +183 -27
  461. data/lib/mongo/srv/monitor.rb +1 -3
  462. data/lib/mongo/srv/resolver.rb +25 -4
  463. data/lib/mongo/srv/result.rb +1 -1
  464. data/lib/mongo/srv.rb +1 -1
  465. data/lib/mongo/timeout.rb +2 -2
  466. data/lib/mongo/topology_version.rb +1 -1
  467. data/lib/mongo/uri/options_mapper.rb +325 -81
  468. data/lib/mongo/uri/srv_protocol.rb +2 -2
  469. data/lib/mongo/uri.rb +61 -17
  470. data/lib/mongo/utils.rb +1 -1
  471. data/lib/mongo/version.rb +1 -5
  472. data/lib/mongo/write_concern/acknowledged.rb +1 -1
  473. data/lib/mongo/write_concern/base.rb +1 -1
  474. data/lib/mongo/write_concern/unacknowledged.rb +1 -1
  475. data/lib/mongo/write_concern.rb +1 -1
  476. data/lib/mongo.rb +26 -1
  477. data/mongo.gemspec +14 -14
  478. data/spec/README.md +23 -5
  479. data/spec/atlas/atlas_connectivity_spec.rb +10 -10
  480. data/spec/atlas/operations_spec.rb +7 -12
  481. data/spec/faas/ruby-sam-app/Gemfile +9 -0
  482. data/spec/faas/ruby-sam-app/mongodb/Gemfile +4 -0
  483. data/spec/faas/ruby-sam-app/mongodb/app.rb +149 -0
  484. data/spec/faas/ruby-sam-app/template.yaml +48 -0
  485. data/spec/integration/auth_spec.rb +1 -1
  486. data/spec/integration/awaited_ismaster_spec.rb +1 -1
  487. data/spec/integration/aws_auth_credentials_cache_spec.rb +51 -0
  488. data/spec/integration/aws_auth_request_spec.rb +2 -2
  489. data/spec/integration/aws_credentials_retriever_spec.rb +32 -2
  490. data/spec/integration/aws_lambda_examples_spec.rb +68 -0
  491. data/spec/integration/bson_symbol_spec.rb +1 -1
  492. data/spec/integration/bulk_insert_spec.rb +1 -1
  493. data/spec/integration/bulk_write_error_message_spec.rb +33 -0
  494. data/spec/integration/bulk_write_spec.rb +1 -1
  495. data/spec/integration/change_stream_examples_spec.rb +1 -1
  496. data/spec/integration/change_stream_spec.rb +12 -6
  497. data/spec/integration/check_clean_slate_spec.rb +1 -1
  498. data/spec/integration/client_authentication_options_spec.rb +1 -1
  499. data/spec/integration/client_connectivity_spec.rb +1 -1
  500. data/spec/integration/client_construction_aws_auth_spec.rb +12 -3
  501. data/spec/integration/client_construction_spec.rb +97 -9
  502. data/spec/integration/client_side_encryption/auto_encryption_bulk_writes_spec.rb +10 -10
  503. data/spec/integration/client_side_encryption/auto_encryption_command_monitoring_spec.rb +169 -169
  504. data/spec/integration/client_side_encryption/auto_encryption_mongocryptd_spawn_spec.rb +3 -3
  505. data/spec/integration/client_side_encryption/auto_encryption_old_wire_version_spec.rb +1 -1
  506. data/spec/integration/client_side_encryption/auto_encryption_reconnect_spec.rb +41 -5
  507. data/spec/integration/client_side_encryption/auto_encryption_spec.rb +537 -387
  508. data/spec/integration/client_side_encryption/automatic_data_encryption_keys_prose_spec.rb +153 -0
  509. data/spec/integration/client_side_encryption/bson_size_limit_spec.rb +3 -3
  510. data/spec/integration/client_side_encryption/bypass_mongocryptd_spawn_spec.rb +3 -3
  511. data/spec/integration/client_side_encryption/client_close_spec.rb +2 -2
  512. data/spec/integration/client_side_encryption/corpus_spec.rb +75 -38
  513. data/spec/integration/client_side_encryption/custom_endpoint_spec.rb +40 -43
  514. data/spec/integration/client_side_encryption/data_key_spec.rb +98 -8
  515. data/spec/integration/client_side_encryption/decryption_events_prose_spec.rb +159 -0
  516. data/spec/integration/client_side_encryption/explicit_encryption_spec.rb +60 -1
  517. data/spec/integration/client_side_encryption/explicit_queryable_encryption_spec.rb +150 -0
  518. data/spec/integration/client_side_encryption/external_key_vault_spec.rb +7 -7
  519. data/spec/integration/client_side_encryption/kms_tls_options_spec.rb +436 -0
  520. data/spec/integration/client_side_encryption/kms_tls_spec.rb +92 -0
  521. data/spec/integration/client_side_encryption/mongocryptd_prose_spec.rb +105 -0
  522. data/spec/integration/client_side_encryption/on_demand_aws_credentials_spec.rb +49 -0
  523. data/spec/integration/client_side_encryption/on_demand_azure_credentials_spec.rb +46 -0
  524. data/spec/integration/client_side_encryption/on_demand_gcp_credentials_spec.rb +47 -0
  525. data/spec/integration/client_side_encryption/queryable_encryption_examples_spec.rb +114 -0
  526. data/spec/integration/client_side_encryption/range_explicit_encryption_prose_spec.rb +583 -0
  527. data/spec/integration/client_side_encryption/rewrap_prose_spec.rb +114 -0
  528. data/spec/integration/client_side_encryption/unique_index_on_key_alt_names_prose_spec.rb +89 -0
  529. data/spec/integration/client_side_encryption/views_spec.rb +2 -2
  530. data/spec/integration/client_side_operations_timeout/encryption_prose_spec.rb +131 -0
  531. data/spec/integration/client_spec.rb +8 -3
  532. data/spec/integration/client_update_spec.rb +7 -3
  533. data/spec/integration/collection_indexes_prose_spec.rb +1 -1
  534. data/spec/integration/command_monitoring_spec.rb +1 -1
  535. data/spec/integration/command_spec.rb +2 -24
  536. data/spec/integration/connect_single_rs_name_spec.rb +1 -1
  537. data/spec/integration/connection/faas_env_spec.rb +62 -0
  538. data/spec/integration/connection_pool_populator_spec.rb +29 -7
  539. data/spec/integration/connection_spec.rb +1 -1
  540. data/spec/integration/crud_spec.rb +13 -1
  541. data/spec/integration/cursor_pinning_spec.rb +21 -62
  542. data/spec/integration/cursor_reaping_spec.rb +2 -2
  543. data/spec/integration/docs_examples_spec.rb +3 -3
  544. data/spec/integration/error_detection_spec.rb +1 -1
  545. data/spec/integration/fork_reconnect_spec.rb +17 -10
  546. data/spec/integration/get_more_spec.rb +1 -1
  547. data/spec/integration/grid_fs_bucket_spec.rb +4 -4
  548. data/spec/integration/heartbeat_events_spec.rb +1 -1
  549. data/spec/integration/map_reduce_spec.rb +5 -1
  550. data/spec/integration/mmapv1_spec.rb +1 -1
  551. data/spec/integration/mongos_pinning_spec.rb +1 -1
  552. data/spec/integration/ocsp_connectivity_spec.rb +1 -1
  553. data/spec/integration/ocsp_verifier_cache_spec.rb +1 -1
  554. data/spec/integration/ocsp_verifier_spec.rb +5 -2
  555. data/spec/integration/operation_failure_code_spec.rb +2 -2
  556. data/spec/integration/operation_failure_message_spec.rb +4 -3
  557. data/spec/integration/query_cache_spec.rb +124 -33
  558. data/spec/integration/query_cache_transactions_spec.rb +1 -1
  559. data/spec/integration/read_concern_spec.rb +1 -1
  560. data/spec/integration/read_preference_spec.rb +1 -1
  561. data/spec/integration/reconnect_spec.rb +6 -1
  562. data/spec/integration/retryable_errors_spec.rb +3 -3
  563. data/spec/integration/retryable_reads_errors_spec.rb +275 -0
  564. data/spec/integration/retryable_writes/retryable_writes_36_and_older_spec.rb +2 -2
  565. data/spec/integration/retryable_writes/retryable_writes_40_and_newer_spec.rb +1 -1
  566. data/spec/integration/retryable_writes/shared/adds_diagnostics.rb +1 -1
  567. data/spec/integration/retryable_writes/shared/does_not_support_retries.rb +1 -1
  568. data/spec/integration/retryable_writes/shared/only_supports_legacy_retries.rb +1 -1
  569. data/spec/integration/retryable_writes/shared/performs_legacy_retries.rb +1 -1
  570. data/spec/integration/retryable_writes/shared/performs_modern_retries.rb +1 -1
  571. data/spec/integration/retryable_writes/shared/performs_no_retries.rb +1 -1
  572. data/spec/integration/retryable_writes/shared/supports_legacy_retries.rb +1 -1
  573. data/spec/integration/retryable_writes/shared/supports_modern_retries.rb +1 -1
  574. data/spec/integration/retryable_writes/shared/supports_retries.rb +1 -1
  575. data/spec/integration/retryable_writes_errors_spec.rb +316 -2
  576. data/spec/integration/sdam_error_handling_spec.rb +69 -5
  577. data/spec/integration/sdam_events_spec.rb +1 -1
  578. data/spec/integration/sdam_prose_spec.rb +3 -3
  579. data/spec/integration/search_indexes_prose_spec.rb +172 -0
  580. data/spec/integration/secondary_reads_spec.rb +1 -0
  581. data/spec/integration/server_description_spec.rb +1 -1
  582. data/spec/integration/server_monitor_spec.rb +3 -2
  583. data/spec/integration/server_selection_spec.rb +1 -1
  584. data/spec/integration/server_selector_spec.rb +5 -3
  585. data/spec/integration/server_spec.rb +26 -28
  586. data/spec/integration/shell_examples_spec.rb +1 -1
  587. data/spec/integration/size_limit_spec.rb +5 -2
  588. data/spec/integration/snappy_compression_spec.rb +1 -1
  589. data/spec/integration/snapshot_query_examples_spec.rb +129 -0
  590. data/spec/integration/srv_monitoring_spec.rb +40 -1
  591. data/spec/integration/srv_spec.rb +4 -3
  592. data/spec/integration/ssl_uri_options_spec.rb +1 -1
  593. data/spec/integration/step_down_spec.rb +25 -7
  594. data/spec/integration/time_zone_querying_spec.rb +1 -1
  595. data/spec/integration/transaction_pinning_spec.rb +20 -6
  596. data/spec/integration/transactions_api_examples_spec.rb +3 -1
  597. data/spec/integration/transactions_examples_spec.rb +1 -1
  598. data/spec/integration/truncated_utf8_spec.rb +1 -1
  599. data/spec/integration/versioned_api_examples_spec.rb +38 -32
  600. data/spec/integration/x509_auth_spec.rb +1 -1
  601. data/spec/integration/zlib_compression_spec.rb +1 -1
  602. data/spec/integration/zstd_compression_spec.rb +1 -1
  603. data/spec/kerberos/kerberos_spec.rb +5 -1
  604. data/spec/lite_spec_helper.rb +63 -26
  605. data/spec/mongo/address/ipv4_spec.rb +1 -1
  606. data/spec/mongo/address/ipv6_spec.rb +8 -1
  607. data/spec/mongo/address/unix_spec.rb +1 -1
  608. data/spec/mongo/address/validator_spec.rb +1 -1
  609. data/spec/mongo/address_spec.rb +15 -2
  610. data/spec/mongo/auth/aws/credential_cache_spec.rb +63 -0
  611. data/spec/mongo/auth/aws/credentials_retriever_spec.rb +90 -0
  612. data/spec/mongo/auth/aws/credentials_spec.rb +46 -0
  613. data/spec/mongo/auth/aws/request_region_spec.rb +1 -1
  614. data/spec/mongo/auth/aws/request_spec.rb +1 -1
  615. data/spec/mongo/auth/cr_spec.rb +2 -22
  616. data/spec/mongo/auth/gssapi/conversation_spec.rb +1 -1
  617. data/spec/mongo/auth/invalid_mechanism_spec.rb +1 -1
  618. data/spec/mongo/auth/ldap/conversation_spec.rb +1 -1
  619. data/spec/mongo/auth/ldap_spec.rb +1 -1
  620. data/spec/mongo/auth/scram/conversation_spec.rb +24 -24
  621. data/spec/mongo/auth/scram256/conversation_spec.rb +21 -21
  622. data/spec/mongo/auth/scram_negotiation_spec.rb +2 -1
  623. data/spec/mongo/auth/scram_spec.rb +1 -1
  624. data/spec/mongo/auth/stringprep/profiles/sasl_spec.rb +1 -1
  625. data/spec/mongo/auth/stringprep_spec.rb +1 -1
  626. data/spec/mongo/auth/user/view_spec.rb +96 -1
  627. data/spec/mongo/auth/user_spec.rb +1 -1
  628. data/spec/mongo/auth/x509/conversation_spec.rb +1 -1
  629. data/spec/mongo/auth/x509_spec.rb +1 -1
  630. data/spec/mongo/auth_spec.rb +1 -1
  631. data/spec/mongo/bson_spec.rb +1 -1
  632. data/spec/mongo/bulk_write/ordered_combiner_spec.rb +1 -1
  633. data/spec/mongo/bulk_write/result_spec.rb +16 -2
  634. data/spec/mongo/bulk_write/unordered_combiner_spec.rb +1 -1
  635. data/spec/mongo/bulk_write_spec.rb +142 -21
  636. data/spec/mongo/caching_cursor_spec.rb +2 -2
  637. data/spec/mongo/client_construction_spec.rb +734 -631
  638. data/spec/mongo/client_encryption_spec.rb +12 -23
  639. data/spec/mongo/client_spec.rb +547 -156
  640. data/spec/mongo/cluster/cursor_reaper_spec.rb +22 -4
  641. data/spec/mongo/cluster/periodic_executor_spec.rb +1 -1
  642. data/spec/mongo/cluster/socket_reaper_spec.rb +1 -1
  643. data/spec/mongo/cluster/topology/replica_set_spec.rb +1 -1
  644. data/spec/mongo/cluster/topology/sharded_spec.rb +1 -1
  645. data/spec/mongo/cluster/topology/single_spec.rb +1 -1
  646. data/spec/mongo/cluster/topology/unknown_spec.rb +1 -1
  647. data/spec/mongo/cluster/topology_spec.rb +1 -1
  648. data/spec/mongo/cluster_spec.rb +193 -199
  649. data/spec/mongo/cluster_time_spec.rb +1 -1
  650. data/spec/mongo/collection/view/aggregation_spec.rb +142 -43
  651. data/spec/mongo/collection/view/builder/find_command_spec.rb +1 -1
  652. data/spec/mongo/collection/view/builder/op_query_spec.rb +1 -1
  653. data/spec/mongo/collection/view/change_stream_resume_spec.rb +1 -1
  654. data/spec/mongo/collection/view/change_stream_spec.rb +6 -6
  655. data/spec/mongo/collection/view/explainable_spec.rb +3 -1
  656. data/spec/mongo/collection/view/immutable_spec.rb +1 -1
  657. data/spec/mongo/collection/view/iterable_spec.rb +1 -1
  658. data/spec/mongo/collection/view/map_reduce_spec.rb +11 -1
  659. data/spec/mongo/collection/view/readable_spec.rb +744 -2
  660. data/spec/mongo/collection/view/writable_spec.rb +145 -33
  661. data/spec/mongo/collection/view_spec.rb +1 -1
  662. data/spec/mongo/collection_crud_spec.rb +122 -15
  663. data/spec/mongo/collection_ddl_spec.rb +116 -66
  664. data/spec/mongo/collection_spec.rb +47 -2
  665. data/spec/mongo/condition_variable_spec.rb +104 -0
  666. data/spec/mongo/config/options_spec.rb +76 -0
  667. data/spec/mongo/config_spec.rb +74 -0
  668. data/spec/mongo/crypt/auto_decryption_context_spec.rb +18 -2
  669. data/spec/mongo/crypt/auto_encrypter_spec.rb +272 -12
  670. data/spec/mongo/crypt/auto_encryption_context_spec.rb +18 -2
  671. data/spec/mongo/crypt/binary_spec.rb +1 -1
  672. data/spec/mongo/crypt/binding/binary_spec.rb +1 -1
  673. data/spec/mongo/crypt/binding/context_spec.rb +68 -18
  674. data/spec/mongo/crypt/binding/helpers_spec.rb +1 -1
  675. data/spec/mongo/crypt/binding/mongocrypt_spec.rb +18 -47
  676. data/spec/mongo/crypt/binding/status_spec.rb +1 -1
  677. data/spec/mongo/crypt/binding/version_spec.rb +48 -1
  678. data/spec/mongo/crypt/binding_unloaded_spec.rb +15 -1
  679. data/spec/mongo/crypt/data_key_context_spec.rb +46 -116
  680. data/spec/mongo/crypt/encryption_io_spec.rb +3 -1
  681. data/spec/mongo/crypt/explicit_decryption_context_spec.rb +33 -2
  682. data/spec/mongo/crypt/explicit_encryption_context_spec.rb +95 -2
  683. data/spec/mongo/crypt/handle_spec.rb +187 -156
  684. data/spec/mongo/crypt/helpers/mongo_crypt_spec_helper.rb +1 -1
  685. data/spec/mongo/crypt/hooks_spec.rb +30 -0
  686. data/spec/mongo/crypt/kms/azure/credentials_retriever_spec.rb +86 -0
  687. data/spec/mongo/crypt/kms/credentials_spec.rb +373 -0
  688. data/spec/mongo/crypt/kms_spec.rb +62 -0
  689. data/spec/mongo/crypt/status_spec.rb +1 -1
  690. data/spec/mongo/crypt_spec.rb +21 -0
  691. data/spec/mongo/cursor/builder/get_more_command_spec.rb +1 -1
  692. data/spec/mongo/cursor/builder/op_get_more_spec.rb +1 -1
  693. data/spec/mongo/cursor_spec.rb +119 -19
  694. data/spec/mongo/database_spec.rb +67 -2
  695. data/spec/mongo/distinguishing_semaphore_spec.rb +7 -7
  696. data/spec/mongo/error/bulk_write_error_spec.rb +1 -1
  697. data/spec/mongo/error/crypt_error_spec.rb +1 -1
  698. data/spec/mongo/error/max_bson_size_spec.rb +1 -1
  699. data/spec/mongo/error/no_server_available_spec.rb +1 -1
  700. data/spec/mongo/error/notable_spec.rb +1 -1
  701. data/spec/mongo/error/operation_failure_heavy_spec.rb +51 -2
  702. data/spec/mongo/error/operation_failure_spec.rb +1 -1
  703. data/spec/mongo/error/parser_spec.rb +1 -1
  704. data/spec/mongo/error/unsupported_option_spec.rb +1 -1
  705. data/spec/mongo/event/publisher_spec.rb +1 -1
  706. data/spec/mongo/event/subscriber_spec.rb +1 -1
  707. data/spec/mongo/grid/file/chunk_spec.rb +1 -1
  708. data/spec/mongo/grid/file/info_spec.rb +1 -1
  709. data/spec/mongo/grid/file_spec.rb +1 -1
  710. data/spec/mongo/grid/fs_bucket_spec.rb +1 -1
  711. data/spec/mongo/grid/stream/read_spec.rb +1 -1
  712. data/spec/mongo/grid/stream/write_spec.rb +1 -1
  713. data/spec/mongo/grid/stream_spec.rb +1 -1
  714. data/spec/mongo/id_spec.rb +2 -2
  715. data/spec/mongo/index/view_spec.rb +126 -1
  716. data/spec/mongo/lint_spec.rb +2 -2
  717. data/spec/mongo/logger_spec.rb +1 -1
  718. data/spec/mongo/monitoring/command_log_subscriber_spec.rb +1 -1
  719. data/spec/mongo/monitoring/event/cmap/connection_check_out_failed_spec.rb +2 -2
  720. data/spec/mongo/monitoring/event/cmap/connection_check_out_started_spec.rb +2 -2
  721. data/spec/mongo/monitoring/event/cmap/connection_checked_in_spec.rb +2 -2
  722. data/spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb +2 -2
  723. data/spec/mongo/monitoring/event/cmap/connection_closed_spec.rb +2 -2
  724. data/spec/mongo/monitoring/event/cmap/connection_created_spec.rb +2 -2
  725. data/spec/mongo/monitoring/event/cmap/connection_ready_spec.rb +2 -2
  726. data/spec/mongo/monitoring/event/cmap/pool_cleared_spec.rb +2 -2
  727. data/spec/mongo/monitoring/event/cmap/pool_closed_spec.rb +2 -2
  728. data/spec/mongo/monitoring/event/cmap/pool_created_spec.rb +2 -2
  729. data/spec/mongo/monitoring/event/command_failed_spec.rb +1 -1
  730. data/spec/mongo/monitoring/event/command_started_spec.rb +1 -1
  731. data/spec/mongo/monitoring/event/command_succeeded_spec.rb +1 -1
  732. data/spec/mongo/monitoring/event/secure_spec.rb +1 -1
  733. data/spec/mongo/monitoring/event/server_closed_spec.rb +1 -1
  734. data/spec/mongo/monitoring/event/server_description_changed_spec.rb +1 -1
  735. data/spec/mongo/monitoring/event/server_heartbeat_failed_spec.rb +1 -1
  736. data/spec/mongo/monitoring/event/server_heartbeat_started_spec.rb +1 -1
  737. data/spec/mongo/monitoring/event/server_heartbeat_succeeded_spec.rb +1 -1
  738. data/spec/mongo/monitoring/event/server_opening_spec.rb +1 -1
  739. data/spec/mongo/monitoring/event/topology_changed_spec.rb +1 -1
  740. data/spec/mongo/monitoring/event/topology_closed_spec.rb +1 -1
  741. data/spec/mongo/monitoring/event/topology_opening_spec.rb +1 -1
  742. data/spec/mongo/monitoring_spec.rb +1 -1
  743. data/spec/mongo/operation/aggregate/result_spec.rb +1 -1
  744. data/spec/mongo/operation/aggregate_spec.rb +1 -1
  745. data/spec/mongo/operation/collections_info_spec.rb +1 -1
  746. data/spec/mongo/operation/command_spec.rb +1 -1
  747. data/spec/mongo/operation/context_spec.rb +79 -0
  748. data/spec/mongo/operation/create/op_msg_spec.rb +240 -0
  749. data/spec/mongo/operation/create_index_spec.rb +1 -1
  750. data/spec/mongo/operation/create_user_spec.rb +1 -1
  751. data/spec/mongo/operation/delete/bulk_spec.rb +1 -1
  752. data/spec/mongo/operation/delete/op_msg_spec.rb +20 -10
  753. data/spec/mongo/operation/delete_spec.rb +1 -31
  754. data/spec/mongo/operation/drop_index_spec.rb +1 -1
  755. data/spec/mongo/operation/find/builder/flags_spec.rb +1 -1
  756. data/spec/mongo/operation/find/builder/modifiers_spec.rb +1 -1
  757. data/spec/mongo/operation/find/op_msg_spec.rb +66 -0
  758. data/spec/mongo/operation/get_more/op_msg_spec.rb +65 -0
  759. data/spec/mongo/operation/indexes_spec.rb +1 -1
  760. data/spec/mongo/operation/insert/bulk_spec.rb +1 -1
  761. data/spec/mongo/operation/insert/op_msg_spec.rb +131 -126
  762. data/spec/mongo/operation/insert_spec.rb +2 -34
  763. data/spec/mongo/operation/limited_spec.rb +1 -1
  764. data/spec/mongo/operation/map_reduce_spec.rb +1 -1
  765. data/spec/mongo/operation/read_preference_legacy_spec.rb +1 -1
  766. data/spec/mongo/operation/read_preference_op_msg_spec.rb +1 -1
  767. data/spec/mongo/operation/remove_user_spec.rb +1 -1
  768. data/spec/mongo/operation/result_spec.rb +21 -1
  769. data/spec/mongo/operation/shared/csot/examples.rb +113 -0
  770. data/spec/mongo/operation/specifiable_spec.rb +1 -1
  771. data/spec/mongo/operation/update/bulk_spec.rb +1 -1
  772. data/spec/mongo/operation/update/op_msg_spec.rb +14 -5
  773. data/spec/mongo/operation/update_spec.rb +1 -30
  774. data/spec/mongo/operation/update_user_spec.rb +1 -1
  775. data/spec/mongo/options/redacted_spec.rb +2 -2
  776. data/spec/mongo/protocol/caching_hash_spec.rb +37 -0
  777. data/spec/mongo/protocol/compressed_spec.rb +1 -1
  778. data/spec/mongo/protocol/get_more_spec.rb +1 -1
  779. data/spec/mongo/protocol/kill_cursors_spec.rb +1 -1
  780. data/spec/mongo/protocol/msg_spec.rb +45 -66
  781. data/spec/mongo/protocol/query_spec.rb +1 -1
  782. data/spec/mongo/protocol/registry_spec.rb +1 -1
  783. data/spec/mongo/protocol/reply_spec.rb +1 -1
  784. data/spec/mongo/query_cache_middleware_spec.rb +1 -1
  785. data/spec/mongo/query_cache_spec.rb +245 -226
  786. data/spec/mongo/retryable/write_worker_spec.rb +39 -0
  787. data/spec/mongo/retryable_spec.rb +38 -6
  788. data/spec/mongo/semaphore_spec.rb +7 -7
  789. data/spec/mongo/server/app_metadata/environment_spec.rb +344 -0
  790. data/spec/mongo/server/app_metadata/truncator_spec.rb +158 -0
  791. data/spec/mongo/server/app_metadata_spec.rb +53 -65
  792. data/spec/mongo/server/connection_auth_spec.rb +4 -2
  793. data/spec/mongo/server/connection_common_spec.rb +14 -2
  794. data/spec/mongo/server/connection_pool/populator_spec.rb +17 -3
  795. data/spec/mongo/server/connection_pool_spec.rb +567 -63
  796. data/spec/mongo/server/connection_spec.rb +93 -163
  797. data/spec/mongo/server/description/features_spec.rb +25 -1
  798. data/spec/mongo/server/description_query_methods_spec.rb +1 -1
  799. data/spec/mongo/server/description_spec.rb +1 -1
  800. data/spec/mongo/server/monitor/app_metadata_spec.rb +1 -1
  801. data/spec/mongo/server/monitor/connection_spec.rb +3 -3
  802. data/spec/mongo/server/monitor_spec.rb +6 -5
  803. data/spec/mongo/server/push_monitor_spec.rb +3 -9
  804. data/spec/mongo/server/round_trip_time_calculator_spec.rb +120 -0
  805. data/spec/mongo/server_selector/nearest_spec.rb +1 -1
  806. data/spec/mongo/server_selector/primary_preferred_spec.rb +1 -1
  807. data/spec/mongo/server_selector/primary_spec.rb +1 -1
  808. data/spec/mongo/server_selector/secondary_preferred_spec.rb +1 -1
  809. data/spec/mongo/server_selector/secondary_spec.rb +1 -1
  810. data/spec/mongo/server_selector_spec.rb +1 -1
  811. data/spec/mongo/server_spec.rb +32 -5
  812. data/spec/mongo/session/server_session_spec.rb +1 -1
  813. data/spec/mongo/session/session_pool_spec.rb +2 -17
  814. data/spec/mongo/session_spec.rb +27 -7
  815. data/spec/mongo/session_transaction_spec.rb +19 -3
  816. data/spec/mongo/socket/ssl_spec.rb +21 -26
  817. data/spec/mongo/socket/tcp_spec.rb +1 -1
  818. data/spec/mongo/socket/unix_spec.rb +1 -1
  819. data/spec/mongo/socket_spec.rb +1 -1
  820. data/spec/mongo/srv/monitor_spec.rb +1 -1
  821. data/spec/mongo/srv/result_spec.rb +1 -1
  822. data/spec/mongo/timeout_spec.rb +1 -1
  823. data/spec/mongo/tls_context_hooks_spec.rb +1 -1
  824. data/spec/mongo/uri/options_mapper_spec.rb +1605 -0
  825. data/spec/mongo/uri/srv_protocol_spec.rb +263 -4
  826. data/spec/mongo/uri_option_parsing_spec.rb +1 -1
  827. data/spec/mongo/uri_spec.rb +168 -11
  828. data/spec/mongo/utils_spec.rb +1 -1
  829. data/spec/mongo/write_concern/acknowledged_spec.rb +1 -1
  830. data/spec/mongo/write_concern/unacknowledged_spec.rb +1 -1
  831. data/spec/mongo/write_concern_spec.rb +1 -1
  832. data/spec/runners/auth.rb +1 -1
  833. data/spec/runners/change_streams/outcome.rb +1 -1
  834. data/spec/runners/change_streams/spec.rb +1 -1
  835. data/spec/runners/change_streams/test.rb +3 -3
  836. data/spec/runners/cmap/verifier.rb +2 -2
  837. data/spec/runners/cmap.rb +188 -45
  838. data/spec/runners/command_monitoring.rb +1 -1
  839. data/spec/runners/connection_string.rb +9 -1
  840. data/spec/runners/crud/context.rb +1 -1
  841. data/spec/runners/crud/operation.rb +15 -6
  842. data/spec/runners/crud/outcome.rb +1 -1
  843. data/spec/runners/crud/requirement.rb +12 -7
  844. data/spec/runners/crud/spec.rb +6 -1
  845. data/spec/runners/crud/test.rb +2 -10
  846. data/spec/runners/crud/test_base.rb +2 -2
  847. data/spec/runners/crud/verifier.rb +12 -4
  848. data/spec/runners/crud.rb +2 -2
  849. data/spec/runners/gridfs.rb +1 -1
  850. data/spec/runners/read_write_concern_document.rb +1 -1
  851. data/spec/runners/sdam/verifier.rb +1 -1
  852. data/spec/runners/sdam.rb +1 -1
  853. data/spec/runners/server_selection.rb +1 -1
  854. data/spec/runners/server_selection_rtt.rb +1 -1
  855. data/spec/runners/transactions/operation.rb +19 -15
  856. data/spec/runners/transactions/spec.rb +3 -3
  857. data/spec/runners/transactions/test.rb +75 -22
  858. data/spec/runners/transactions.rb +12 -9
  859. data/spec/runners/unified/ambiguous_operations.rb +13 -0
  860. data/spec/runners/unified/assertions.rb +163 -50
  861. data/spec/runners/unified/change_stream_operations.rb +22 -9
  862. data/spec/runners/unified/client_side_encryption_operations.rb +83 -0
  863. data/spec/runners/unified/crud_operations.rb +129 -22
  864. data/spec/runners/unified/ddl_operations.rb +160 -8
  865. data/spec/runners/unified/entity_map.rb +1 -1
  866. data/spec/runners/unified/error.rb +3 -2
  867. data/spec/runners/unified/event_subscriber.rb +9 -3
  868. data/spec/runners/unified/exceptions.rb +1 -1
  869. data/spec/runners/unified/grid_fs_operations.rb +59 -3
  870. data/spec/runners/unified/search_index_operations.rb +63 -0
  871. data/spec/runners/unified/support_operations.rb +115 -11
  872. data/spec/runners/unified/test.rb +204 -36
  873. data/spec/runners/unified/test_group.rb +1 -1
  874. data/spec/runners/unified/thread_operations.rb +73 -0
  875. data/spec/runners/unified.rb +15 -5
  876. data/spec/solo/clean_exit_spec.rb +7 -7
  877. data/spec/spec_helper.rb +2 -3
  878. data/spec/spec_tests/auth_spec.rb +1 -1
  879. data/spec/spec_tests/change_streams_unified_spec.rb +2 -1
  880. data/spec/spec_tests/client_side_encryption_spec.rb +25 -2
  881. data/spec/spec_tests/client_side_encryption_unified_spec.rb +26 -0
  882. data/spec/spec_tests/client_side_operations_timeout_spec.rb +15 -0
  883. data/spec/spec_tests/cmap_spec.rb +29 -15
  884. data/spec/spec_tests/collection_management_spec.rb +1 -1
  885. data/spec/spec_tests/command_monitoring_unified_spec.rb +1 -1
  886. data/spec/spec_tests/connection_string_spec.rb +1 -1
  887. data/spec/spec_tests/crud_spec.rb +1 -11
  888. data/spec/spec_tests/crud_unified_spec.rb +1 -1
  889. data/spec/spec_tests/data/change_streams_unified/change-streams-clusterTime.yml +43 -0
  890. data/spec/spec_tests/data/change_streams_unified/change-streams-disambiguatedPaths.yml +105 -0
  891. data/spec/spec_tests/data/change_streams_unified/change-streams-errors.yml +122 -0
  892. data/spec/spec_tests/data/change_streams_unified/change-streams-pre_and_post_images.yml +351 -0
  893. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-allowlist.yml +1169 -0
  894. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-errorLabels.yml +1069 -0
  895. data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +307 -0
  896. data/spec/spec_tests/data/change_streams_unified/change-streams.yml +859 -4
  897. data/spec/spec_tests/data/client_side_encryption/aggregate.yml +3 -17
  898. data/spec/spec_tests/data/client_side_encryption/awsTemporary.yml +57 -0
  899. data/spec/spec_tests/data/client_side_encryption/azureKMS.yml +46 -0
  900. data/spec/spec_tests/data/client_side_encryption/badQueries.yml +14 -3
  901. data/spec/spec_tests/data/client_side_encryption/basic.yml +3 -17
  902. data/spec/spec_tests/data/client_side_encryption/bulk.yml +1 -8
  903. data/spec/spec_tests/data/client_side_encryption/bypassAutoEncryption.yml +2 -2
  904. data/spec/spec_tests/data/client_side_encryption/bypassedCommand.yml +5 -4
  905. data/spec/spec_tests/data/client_side_encryption/count.yml +1 -8
  906. data/spec/spec_tests/data/client_side_encryption/countDocuments.yml +1 -8
  907. data/spec/spec_tests/data/client_side_encryption/create-and-createIndexes.yml +58 -0
  908. data/spec/spec_tests/data/client_side_encryption/delete.yml +2 -16
  909. data/spec/spec_tests/data/client_side_encryption/distinct.yml +1 -8
  910. data/spec/spec_tests/data/client_side_encryption/explain.yml +3 -10
  911. data/spec/spec_tests/data/client_side_encryption/find.yml +2 -16
  912. data/spec/spec_tests/data/client_side_encryption/findOneAndDelete.yml +1 -8
  913. data/spec/spec_tests/data/client_side_encryption/findOneAndReplace.yml +1 -8
  914. data/spec/spec_tests/data/client_side_encryption/findOneAndUpdate.yml +1 -8
  915. data/spec/spec_tests/data/client_side_encryption/fle2v2-BypassQueryAnalysis.yml +90 -0
  916. data/spec/spec_tests/data/client_side_encryption/fle2v2-Compact.yml +83 -0
  917. data/spec/spec_tests/data/client_side_encryption/fle2v2-CreateCollection-OldServer.yml +61 -0
  918. data/spec/spec_tests/data/client_side_encryption/fle2v2-CreateCollection.yml +938 -0
  919. data/spec/spec_tests/data/client_side_encryption/fle2v2-DecryptExistingData.yml +67 -0
  920. data/spec/spec_tests/data/client_side_encryption/fle2v2-Delete.yml +101 -0
  921. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.yml +80 -0
  922. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-jsonSchema.yml +103 -0
  923. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFieldsMap-defaults.yml +59 -0
  924. data/spec/spec_tests/data/client_side_encryption/fle2v2-FindOneAndUpdate.yml +201 -0
  925. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Indexed.yml +97 -0
  926. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml +90 -0
  927. data/spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml +44 -0
  928. data/spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml +45 -0
  929. data/spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml +211 -0
  930. data/spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml +170 -0
  931. data/spec/spec_tests/data/client_side_encryption/gcpKMS.yml +46 -0
  932. data/spec/spec_tests/data/client_side_encryption/getMore.yml +1 -8
  933. data/spec/spec_tests/data/client_side_encryption/insert.yml +2 -16
  934. data/spec/spec_tests/data/client_side_encryption/keyAltName.yml +1 -8
  935. data/spec/spec_tests/data/client_side_encryption/localKMS.yml +1 -8
  936. data/spec/spec_tests/data/client_side_encryption/localSchema.yml +1 -8
  937. data/spec/spec_tests/data/client_side_encryption/maxWireVersion.yml +3 -1
  938. data/spec/spec_tests/data/client_side_encryption/missingKey.yml +2 -9
  939. data/spec/spec_tests/data/client_side_encryption/noSchema.yml +39 -0
  940. data/spec/spec_tests/data/client_side_encryption/replaceOne.yml +1 -8
  941. data/spec/spec_tests/data/client_side_encryption/timeoutMS.yml +67 -0
  942. data/spec/spec_tests/data/client_side_encryption/types.yml +44 -70
  943. data/spec/spec_tests/data/client_side_encryption/unified/addKeyAltName.yml +194 -0
  944. data/spec/spec_tests/data/client_side_encryption/unified/createDataKey-kms_providers-invalid.yml +67 -0
  945. data/spec/spec_tests/data/client_side_encryption/unified/createDataKey.yml +309 -0
  946. data/spec/spec_tests/data/client_side_encryption/unified/deleteKey.yml +159 -0
  947. data/spec/spec_tests/data/client_side_encryption/unified/getKey.yml +105 -0
  948. data/spec/spec_tests/data/client_side_encryption/unified/getKeyByAltName.yml +104 -0
  949. data/spec/spec_tests/data/client_side_encryption/unified/getKeys.yml +122 -0
  950. data/spec/spec_tests/data/client_side_encryption/unified/removeKeyAltName.yml +157 -0
  951. data/spec/spec_tests/data/client_side_encryption/unified/rewrapManyDataKey-decrypt_failure.yml +69 -0
  952. data/spec/spec_tests/data/client_side_encryption/unified/rewrapManyDataKey-encrypt_failure.yml +122 -0
  953. data/spec/spec_tests/data/client_side_encryption/unified/rewrapManyDataKey.yml +432 -0
  954. data/spec/spec_tests/data/client_side_encryption/updateMany.yml +1 -8
  955. data/spec/spec_tests/data/client_side_encryption/updateOne.yml +1 -8
  956. data/spec/spec_tests/data/client_side_encryption/validatorAndPartialFieldExpression.yml +166 -0
  957. data/spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml +87 -0
  958. data/spec/spec_tests/data/client_side_operations_timeout/change-streams.yml +358 -0
  959. data/spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml +129 -0
  960. data/spec/spec_tests/data/client_side_operations_timeout/command-execution.yml +250 -0
  961. data/spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml +113 -0
  962. data/spec/spec_tests/data/client_side_operations_timeout/cursors.yml +70 -0
  963. data/spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml +3982 -0
  964. data/spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml +96 -0
  965. data/spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml +3236 -0
  966. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml +207 -0
  967. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml +152 -0
  968. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml +182 -0
  969. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml +100 -0
  970. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml +249 -0
  971. data/spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml +204 -0
  972. data/spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml +307 -0
  973. data/spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml +1877 -0
  974. data/spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml +1918 -0
  975. data/spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml +1676 -0
  976. data/spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml +2824 -0
  977. data/spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml +168 -0
  978. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml +171 -0
  979. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml +168 -0
  980. data/spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml +247 -0
  981. data/spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml +181 -0
  982. data/spec/spec_tests/data/cmap/connection-must-have-id.yml +2 -0
  983. data/spec/spec_tests/data/cmap/connection-must-order-ids.yml +2 -0
  984. data/spec/spec_tests/data/cmap/pool-checkin-destroy-closed.yml +2 -0
  985. data/spec/spec_tests/data/cmap/pool-checkin-destroy-stale.yml +2 -0
  986. data/spec/spec_tests/data/cmap/pool-checkin-make-available.yml +3 -1
  987. data/spec/spec_tests/data/cmap/pool-checkin.yml +5 -0
  988. data/spec/spec_tests/data/cmap/pool-checkout-connection.yml +2 -0
  989. data/spec/spec_tests/data/cmap/pool-checkout-custom-maxConnecting-is-enforced.yml +50 -0
  990. data/spec/spec_tests/data/cmap/pool-checkout-error-closed.yml +2 -0
  991. data/spec/spec_tests/data/cmap/pool-checkout-maxConnecting-is-enforced.yml +81 -0
  992. data/spec/spec_tests/data/cmap/pool-checkout-maxConnecting-timeout.yml +71 -0
  993. data/spec/spec_tests/data/cmap/pool-checkout-minPoolSize-connection-maxConnecting.yml +64 -0
  994. data/spec/spec_tests/data/cmap/pool-checkout-multiple.yml +2 -0
  995. data/spec/spec_tests/data/cmap/pool-checkout-no-idle.yml +6 -0
  996. data/spec/spec_tests/data/cmap/pool-checkout-no-stale.yml +8 -0
  997. data/spec/spec_tests/data/cmap/pool-checkout-returned-connection-maxConnecting.yml +88 -0
  998. data/spec/spec_tests/data/cmap/pool-clear-interrupting-pending-connections.yml +43 -0
  999. data/spec/spec_tests/data/cmap/pool-clear-min-size.yml +41 -0
  1000. data/spec/spec_tests/data/cmap/pool-clear-paused.yml +18 -0
  1001. data/spec/spec_tests/data/cmap/pool-clear-ready.yml +39 -0
  1002. data/spec/spec_tests/data/cmap/pool-clear-schedule-run-interruptInUseConnections-false.yml +48 -0
  1003. data/spec/spec_tests/data/cmap/pool-close-destroy-conns.yml +2 -0
  1004. data/spec/spec_tests/data/cmap/pool-create-max-size.yml +2 -0
  1005. data/spec/spec_tests/data/cmap/pool-create-min-size-error.yml +43 -0
  1006. data/spec/spec_tests/data/cmap/pool-create-min-size.yml +9 -0
  1007. data/spec/spec_tests/data/cmap/pool-ready-ready.yml +22 -0
  1008. data/spec/spec_tests/data/cmap/pool-ready.yml +30 -0
  1009. data/spec/spec_tests/data/cmap/wait-queue-fairness.yml +2 -0
  1010. data/spec/spec_tests/data/cmap/wait-queue-timeout.yml +6 -1
  1011. data/spec/spec_tests/data/collection_management/clustered-indexes.yml +135 -0
  1012. data/spec/spec_tests/data/collection_management/createCollection-pre_and_post_images.yml +50 -0
  1013. data/spec/spec_tests/data/collection_management/modifyCollection-errorResponse.yml +59 -0
  1014. data/spec/spec_tests/data/collection_management/modifyCollection-pre_and_post_images.yml +58 -0
  1015. data/spec/spec_tests/data/collection_management/timeseries-collection.yml +35 -0
  1016. data/spec/spec_tests/data/command_monitoring_unified/bulkWrite.yml +68 -0
  1017. data/spec/spec_tests/data/command_monitoring_unified/command.yml +50 -0
  1018. data/spec/spec_tests/data/command_monitoring_unified/deleteMany.yml +79 -0
  1019. data/spec/spec_tests/data/command_monitoring_unified/deleteOne.yml +79 -0
  1020. data/spec/spec_tests/data/command_monitoring_unified/find.yml +254 -0
  1021. data/spec/spec_tests/data/command_monitoring_unified/insertMany.yml +79 -0
  1022. data/spec/spec_tests/data/command_monitoring_unified/insertOne.yml +77 -0
  1023. data/spec/spec_tests/data/command_monitoring_unified/pre-42-server-connection-id.yml +56 -0
  1024. data/spec/spec_tests/data/command_monitoring_unified/redacted-commands.yml +8 -0
  1025. data/spec/spec_tests/data/command_monitoring_unified/server-connection-id.yml +56 -0
  1026. data/spec/spec_tests/data/command_monitoring_unified/unacknowledgedBulkWrite.yml +55 -0
  1027. data/spec/spec_tests/data/command_monitoring_unified/updateMany.yml +87 -0
  1028. data/spec/spec_tests/data/command_monitoring_unified/updateOne.yml +118 -0
  1029. data/spec/spec_tests/data/command_monitoring_unified/writeConcernError.yml +80 -0
  1030. data/spec/spec_tests/data/connection_string/invalid-uris.yml +0 -10
  1031. data/spec/spec_tests/data/connection_string/valid-options.yml +13 -0
  1032. data/spec/spec_tests/data/crud/read/aggregate-collation.yml +1 -1
  1033. data/spec/spec_tests/data/crud/read/count-collation.yml +1 -1
  1034. data/spec/spec_tests/data/crud/read/distinct-collation.yml +1 -1
  1035. data/spec/spec_tests/data/crud/read/find-collation.yml +1 -1
  1036. data/spec/spec_tests/data/crud/write/bulkWrite-collation.yml +1 -1
  1037. data/spec/spec_tests/data/crud/write/deleteMany-collation.yml +1 -1
  1038. data/spec/spec_tests/data/crud/write/deleteOne-collation.yml +1 -1
  1039. data/spec/spec_tests/data/crud/write/findOneAndDelete-collation.yml +1 -1
  1040. data/spec/spec_tests/data/crud/write/findOneAndReplace-collation.yml +1 -1
  1041. data/spec/spec_tests/data/crud/write/findOneAndUpdate-collation.yml +1 -1
  1042. data/spec/spec_tests/data/crud/write/replaceOne-collation.yml +1 -1
  1043. data/spec/spec_tests/data/crud/write/updateMany-collation.yml +1 -1
  1044. data/spec/spec_tests/data/crud/write/updateOne-collation.yml +1 -1
  1045. data/spec/spec_tests/data/crud_unified/aggregate-allowdiskuse.yml +75 -0
  1046. data/spec/spec_tests/data/crud_unified/aggregate-merge-errorResponse.yml +42 -0
  1047. data/spec/spec_tests/data/crud_unified/aggregate-merge.yml +185 -0
  1048. data/spec/spec_tests/data/crud_unified/aggregate-out-readConcern.yml +171 -0
  1049. data/spec/spec_tests/data/crud_unified/aggregate-write-readPreference.yml +6 -0
  1050. data/spec/spec_tests/data/crud_unified/aggregate.yml +215 -0
  1051. data/spec/spec_tests/data/crud_unified/bulkWrite-arrayFilters-clientError.yml +98 -0
  1052. data/spec/spec_tests/data/crud_unified/bulkWrite-arrayFilters.yml +174 -0
  1053. data/spec/spec_tests/data/crud_unified/bulkWrite-comment.yml +189 -0
  1054. data/spec/spec_tests/data/crud_unified/bulkWrite-delete-hint-clientError.yml +113 -0
  1055. data/spec/spec_tests/data/crud_unified/bulkWrite-delete-hint-serverError.yml +142 -0
  1056. data/spec/spec_tests/data/crud_unified/bulkWrite-delete-hint.yml +154 -0
  1057. data/spec/spec_tests/data/crud_unified/bulkWrite-deleteMany-hint-unacknowledged.yml +98 -0
  1058. data/spec/spec_tests/data/crud_unified/bulkWrite-deleteMany-let.yml +86 -0
  1059. data/spec/spec_tests/data/crud_unified/bulkWrite-deleteOne-hint-unacknowledged.yml +97 -0
  1060. data/spec/spec_tests/data/crud_unified/bulkWrite-deleteOne-let.yml +86 -0
  1061. data/spec/spec_tests/data/crud_unified/bulkWrite-errorResponse.yml +50 -0
  1062. data/spec/spec_tests/data/crud_unified/bulkWrite-insertOne-dots_and_dollars.yml +138 -0
  1063. data/spec/spec_tests/data/crud_unified/bulkWrite-replaceOne-dots_and_dollars.yml +165 -0
  1064. data/spec/spec_tests/data/crud_unified/bulkWrite-replaceOne-hint-unacknowledged.yml +103 -0
  1065. data/spec/spec_tests/data/crud_unified/bulkWrite-replaceOne-let.yml +93 -0
  1066. data/spec/spec_tests/data/crud_unified/bulkWrite-update-hint-clientError.yml +148 -0
  1067. data/spec/spec_tests/data/crud_unified/bulkWrite-update-hint-serverError.yml +239 -0
  1068. data/spec/spec_tests/data/crud_unified/bulkWrite-update-hint.yml +256 -0
  1069. data/spec/spec_tests/data/crud_unified/bulkWrite-update-validation.yml +73 -0
  1070. data/spec/spec_tests/data/crud_unified/bulkWrite-updateMany-dots_and_dollars.yml +150 -0
  1071. data/spec/spec_tests/data/crud_unified/bulkWrite-updateMany-hint-unacknowledged.yml +104 -0
  1072. data/spec/spec_tests/data/crud_unified/bulkWrite-updateMany-let.yml +96 -0
  1073. data/spec/spec_tests/data/crud_unified/bulkWrite-updateOne-dots_and_dollars.yml +150 -0
  1074. data/spec/spec_tests/data/crud_unified/bulkWrite-updateOne-hint-unacknowledged.yml +103 -0
  1075. data/spec/spec_tests/data/crud_unified/bulkWrite-updateOne-let.yml +95 -0
  1076. data/spec/spec_tests/data/crud_unified/countDocuments-comment.yml +92 -0
  1077. data/spec/spec_tests/data/crud_unified/db-aggregate-write-readPreference.yml +6 -0
  1078. data/spec/spec_tests/data/crud_unified/db-aggregate.yml +73 -0
  1079. data/spec/spec_tests/data/crud_unified/deleteMany-comment.yml +97 -0
  1080. data/spec/spec_tests/data/crud_unified/deleteMany-hint-clientError.yml +87 -0
  1081. data/spec/spec_tests/data/crud_unified/deleteMany-hint-serverError.yml +107 -0
  1082. data/spec/spec_tests/data/crud_unified/deleteMany-hint-unacknowledged.yml +90 -0
  1083. data/spec/spec_tests/data/crud_unified/deleteMany-hint.yml +99 -0
  1084. data/spec/spec_tests/data/crud_unified/deleteMany-let.yml +2 -0
  1085. data/spec/spec_tests/data/crud_unified/deleteOne-comment.yml +98 -0
  1086. data/spec/spec_tests/data/crud_unified/deleteOne-errorResponse.yml +46 -0
  1087. data/spec/spec_tests/data/crud_unified/deleteOne-hint-clientError.yml +80 -0
  1088. data/spec/spec_tests/data/crud_unified/deleteOne-hint-serverError.yml +100 -0
  1089. data/spec/spec_tests/data/crud_unified/deleteOne-hint-unacknowledged.yml +89 -0
  1090. data/spec/spec_tests/data/crud_unified/deleteOne-hint.yml +95 -0
  1091. data/spec/spec_tests/data/crud_unified/deleteOne-let.yml +2 -0
  1092. data/spec/spec_tests/data/crud_unified/distinct-comment.yml +98 -0
  1093. data/spec/spec_tests/data/crud_unified/estimatedDocumentCount-comment.yml +95 -0
  1094. data/spec/spec_tests/data/crud_unified/estimatedDocumentCount.yml +49 -135
  1095. data/spec/spec_tests/data/crud_unified/find-allowdiskuse-clientError.yml +55 -0
  1096. data/spec/spec_tests/data/crud_unified/find-allowdiskuse-serverError.yml +68 -0
  1097. data/spec/spec_tests/data/crud_unified/find-allowdiskuse.yml +79 -0
  1098. data/spec/spec_tests/data/crud_unified/find-comment.yml +166 -0
  1099. data/spec/spec_tests/data/crud_unified/find-test-all-options.yml +377 -0
  1100. data/spec/spec_tests/data/crud_unified/find.yml +68 -0
  1101. data/spec/spec_tests/data/crud_unified/findOneAndDelete-comment.yml +96 -0
  1102. data/spec/spec_tests/data/crud_unified/findOneAndDelete-hint-clientError.yml +91 -0
  1103. data/spec/spec_tests/data/crud_unified/findOneAndDelete-hint-serverError.yml +107 -0
  1104. data/spec/spec_tests/data/crud_unified/findOneAndDelete-hint-unacknowledged.yml +88 -0
  1105. data/spec/spec_tests/data/crud_unified/findOneAndDelete-hint.yml +102 -0
  1106. data/spec/spec_tests/data/crud_unified/findOneAndDelete-let.yml +2 -4
  1107. data/spec/spec_tests/data/crud_unified/findOneAndReplace-comment.yml +101 -0
  1108. data/spec/spec_tests/data/crud_unified/findOneAndReplace-dots_and_dollars.yml +140 -0
  1109. data/spec/spec_tests/data/crud_unified/findOneAndReplace-hint-clientError.yml +83 -0
  1110. data/spec/spec_tests/data/crud_unified/findOneAndReplace-hint-serverError.yml +99 -0
  1111. data/spec/spec_tests/data/crud_unified/findOneAndReplace-hint-unacknowledged.yml +96 -0
  1112. data/spec/spec_tests/data/crud_unified/findOneAndReplace-hint.yml +98 -0
  1113. data/spec/spec_tests/data/crud_unified/findOneAndUpdate-comment.yml +95 -0
  1114. data/spec/spec_tests/data/crud_unified/findOneAndUpdate-dots_and_dollars.yml +127 -0
  1115. data/spec/spec_tests/data/crud_unified/findOneAndUpdate-errorResponse.yml +69 -0
  1116. data/spec/spec_tests/data/crud_unified/findOneAndUpdate-hint-clientError.yml +84 -0
  1117. data/spec/spec_tests/data/crud_unified/findOneAndUpdate-hint-serverError.yml +100 -0
  1118. data/spec/spec_tests/data/crud_unified/findOneAndUpdate-hint-unacknowledged.yml +92 -0
  1119. data/spec/spec_tests/data/crud_unified/findOneAndUpdate-hint.yml +99 -0
  1120. data/spec/spec_tests/data/crud_unified/insertMany-comment.yml +93 -0
  1121. data/spec/spec_tests/data/crud_unified/insertMany-dots_and_dollars.yml +128 -0
  1122. data/spec/spec_tests/data/crud_unified/insertOne-comment.yml +91 -0
  1123. data/spec/spec_tests/data/crud_unified/insertOne-dots_and_dollars.yml +238 -0
  1124. data/spec/spec_tests/data/crud_unified/insertOne-errorResponse.yml +46 -0
  1125. data/spec/spec_tests/data/crud_unified/replaceOne-comment.yml +105 -0
  1126. data/spec/spec_tests/data/crud_unified/replaceOne-dots_and_dollars.yml +180 -0
  1127. data/spec/spec_tests/data/crud_unified/replaceOne-hint-unacknowledged.yml +95 -0
  1128. data/spec/spec_tests/data/crud_unified/replaceOne-hint.yml +108 -0
  1129. data/spec/spec_tests/data/crud_unified/replaceOne-let.yml +98 -0
  1130. data/spec/spec_tests/data/crud_unified/replaceOne-validation.yml +37 -0
  1131. data/spec/spec_tests/data/crud_unified/updateMany-comment.yml +104 -0
  1132. data/spec/spec_tests/data/crud_unified/updateMany-dots_and_dollars.yml +138 -0
  1133. data/spec/spec_tests/data/crud_unified/updateMany-hint-clientError.yml +91 -0
  1134. data/spec/spec_tests/data/crud_unified/updateMany-hint-serverError.yml +115 -0
  1135. data/spec/spec_tests/data/crud_unified/updateMany-hint-unacknowledged.yml +96 -0
  1136. data/spec/spec_tests/data/crud_unified/updateMany-hint.yml +115 -0
  1137. data/spec/spec_tests/data/crud_unified/updateMany-let.yml +5 -1
  1138. data/spec/spec_tests/data/crud_unified/updateMany-validation.yml +39 -0
  1139. data/spec/spec_tests/data/crud_unified/updateOne-comment.yml +104 -0
  1140. data/spec/spec_tests/data/crud_unified/updateOne-dots_and_dollars.yml +138 -0
  1141. data/spec/spec_tests/data/crud_unified/updateOne-errorResponse.yml +47 -0
  1142. data/spec/spec_tests/data/crud_unified/updateOne-hint-clientError.yml +85 -0
  1143. data/spec/spec_tests/data/crud_unified/updateOne-hint-serverError.yml +109 -0
  1144. data/spec/spec_tests/data/crud_unified/updateOne-hint-unacknowledged.yml +95 -0
  1145. data/spec/spec_tests/data/crud_unified/updateOne-hint.yml +109 -0
  1146. data/spec/spec_tests/data/crud_unified/updateOne-let.yml +5 -1
  1147. data/spec/spec_tests/data/crud_unified/updateOne-validation.yml +37 -0
  1148. data/spec/spec_tests/data/crud_unified/updateWithPipelines.yml +8 -14
  1149. data/spec/spec_tests/data/gridfs_unified/delete.yml +198 -0
  1150. data/spec/spec_tests/data/gridfs_unified/download.yml +241 -0
  1151. data/spec/spec_tests/data/gridfs_unified/downloadByName.yml +159 -0
  1152. data/spec/spec_tests/data/gridfs_unified/upload-disableMD5.yml +92 -0
  1153. data/spec/spec_tests/data/gridfs_unified/upload.yml +288 -0
  1154. data/spec/spec_tests/data/index_management/createSearchIndex.yml +64 -0
  1155. data/spec/spec_tests/data/index_management/createSearchIndexes.yml +86 -0
  1156. data/spec/spec_tests/data/index_management/dropSearchIndex.yml +43 -0
  1157. data/spec/spec_tests/data/index_management/listSearchIndexes.yml +91 -0
  1158. data/spec/spec_tests/data/index_management/updateSearchIndex.yml +46 -0
  1159. data/spec/spec_tests/data/retryable_reads/{estimatedDocumentCount-serverErrors-pre4.9.yml → legacy/estimatedDocumentCount-serverErrors.yml} +0 -2
  1160. data/spec/spec_tests/data/retryable_reads/{estimatedDocumentCount-pre4.9.yml → legacy/estimatedDocumentCount.yml} +0 -2
  1161. data/spec/spec_tests/data/retryable_reads/unified/handshakeError.yml +1342 -0
  1162. data/spec/spec_tests/data/retryable_writes/{bulkWrite-serverErrors.yml → legacy/bulkWrite-serverErrors.yml} +1 -1
  1163. data/spec/spec_tests/data/retryable_writes/{deleteOne-serverErrors.yml → legacy/deleteOne-serverErrors.yml} +1 -1
  1164. data/spec/spec_tests/data/retryable_writes/{findOneAndDelete-serverErrors.yml → legacy/findOneAndDelete-serverErrors.yml} +1 -1
  1165. data/spec/spec_tests/data/retryable_writes/{findOneAndReplace-serverErrors.yml → legacy/findOneAndReplace-serverErrors.yml} +1 -1
  1166. data/spec/spec_tests/data/retryable_writes/{findOneAndUpdate-serverErrors.yml → legacy/findOneAndUpdate-serverErrors.yml} +1 -1
  1167. data/spec/spec_tests/data/retryable_writes/{insertMany-serverErrors.yml → legacy/insertMany-serverErrors.yml} +1 -1
  1168. data/spec/spec_tests/data/retryable_writes/{insertOne-serverErrors.yml → legacy/insertOne-serverErrors.yml} +5 -5
  1169. data/spec/spec_tests/data/retryable_writes/{replaceOne-serverErrors.yml → legacy/replaceOne-serverErrors.yml} +1 -1
  1170. data/spec/spec_tests/data/retryable_writes/{updateOne-serverErrors.yml → legacy/updateOne-serverErrors.yml} +1 -1
  1171. data/spec/spec_tests/data/retryable_writes/unified/bulkWrite-serverErrors.yml +93 -0
  1172. data/spec/spec_tests/data/retryable_writes/unified/handshakeError.yml +785 -0
  1173. data/spec/spec_tests/data/retryable_writes/unified/insertOne-noWritesPerformedError.yml +54 -0
  1174. data/spec/spec_tests/data/retryable_writes/unified/insertOne-serverErrors.yml +75 -0
  1175. data/spec/spec_tests/data/run_command_unified/runCommand.yml +319 -0
  1176. data/spec/spec_tests/data/sdam/errors/prefer-error-code.yml +2 -2
  1177. data/spec/spec_tests/data/sdam/rs/electionId_precedence_setVersion.yml +62 -0
  1178. data/spec/spec_tests/data/sdam/rs/null_election_id-pre-6.0.yml +175 -0
  1179. data/spec/spec_tests/data/sdam/rs/null_election_id.yml +20 -18
  1180. data/spec/spec_tests/data/sdam/rs/secondary_ignore_ok_0-pre-6.0.yml +87 -0
  1181. data/spec/spec_tests/data/sdam/rs/secondary_ignore_ok_0.yml +1 -1
  1182. data/spec/spec_tests/data/sdam/rs/set_version_can_rollback.yml +101 -0
  1183. data/spec/spec_tests/data/sdam/rs/setversion_equal_max_without_electionid.yml +78 -0
  1184. data/spec/spec_tests/data/sdam/rs/setversion_greaterthan_max_without_electionid.yml +79 -0
  1185. data/spec/spec_tests/data/sdam/rs/setversion_without_electionid-pre-6.0.yml +79 -0
  1186. data/spec/spec_tests/data/sdam/rs/setversion_without_electionid.yml +9 -10
  1187. data/spec/spec_tests/data/sdam/rs/use_setversion_without_electionid-pre-6.0.yml +117 -0
  1188. data/spec/spec_tests/data/sdam/rs/use_setversion_without_electionid.yml +23 -21
  1189. data/spec/spec_tests/data/sdam_monitoring/discovered_standalone.yml +1 -1
  1190. data/spec/spec_tests/data/sdam_monitoring/replica_set_with_no_primary.yml +38 -39
  1191. data/spec/spec_tests/data/sdam_monitoring/replica_set_with_primary.yml +38 -39
  1192. data/spec/spec_tests/data/sdam_monitoring/replica_set_with_removal.yml +1 -1
  1193. data/spec/spec_tests/data/sdam_monitoring/required_replica_set.yml +1 -1
  1194. data/spec/spec_tests/data/sdam_monitoring/standalone.yml +1 -1
  1195. data/spec/spec_tests/data/sdam_monitoring/standalone_suppress_equal_description_changes.yml +2 -2
  1196. data/spec/spec_tests/data/sdam_unified/auth-error.yml +130 -0
  1197. data/spec/spec_tests/data/sdam_unified/auth-misc-command-error.yml +132 -0
  1198. data/spec/spec_tests/data/sdam_unified/auth-network-error.yml +132 -0
  1199. data/spec/spec_tests/data/sdam_unified/auth-network-timeout-error.yml +138 -0
  1200. data/spec/spec_tests/data/sdam_unified/auth-shutdown-error.yml +133 -0
  1201. data/spec/spec_tests/data/sdam_unified/cancel-server-check.yml +143 -0
  1202. data/spec/spec_tests/data/sdam_unified/connectTimeoutMS.yml +130 -0
  1203. data/spec/spec_tests/data/sdam_unified/find-network-error.yml +135 -0
  1204. data/spec/spec_tests/data/sdam_unified/find-network-timeout-error.yml +119 -0
  1205. data/spec/spec_tests/data/sdam_unified/find-shutdown-error.yml +163 -0
  1206. data/spec/spec_tests/data/sdam_unified/hello-command-error.yml +233 -0
  1207. data/spec/spec_tests/data/sdam_unified/hello-network-error.yml +228 -0
  1208. data/spec/spec_tests/data/sdam_unified/hello-timeout.yml +318 -0
  1209. data/spec/spec_tests/data/sdam_unified/insert-network-error.yml +137 -0
  1210. data/spec/spec_tests/data/sdam_unified/insert-shutdown-error.yml +162 -0
  1211. data/spec/spec_tests/data/sdam_unified/interruptInUse-pool-clear.yml +340 -0
  1212. data/spec/spec_tests/data/sdam_unified/minPoolSize-error.yml +125 -0
  1213. data/spec/spec_tests/data/sdam_unified/pool-cleared-error.yml +239 -0
  1214. data/spec/spec_tests/data/sdam_unified/rediscover-quickly-after-step-down.yml +144 -0
  1215. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-directConnection.yml +6 -5
  1216. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-no-results.yml +5 -0
  1217. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-replicaSet-errors.yml +2 -2
  1218. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-txt.yml +5 -4
  1219. data/spec/spec_tests/data/seed_list_discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true-txt.yml +5 -0
  1220. data/spec/spec_tests/data/seed_list_discovery/load-balanced/srvMaxHosts-conflicts_with_loadBalanced-true.yml +5 -0
  1221. data/spec/spec_tests/data/seed_list_discovery/load-balanced/srvMaxHosts-zero-txt.yml +11 -0
  1222. data/spec/spec_tests/data/seed_list_discovery/load-balanced/srvMaxHosts-zero.yml +11 -0
  1223. data/spec/spec_tests/data/seed_list_discovery/replica-set/srv-service-name.yml +11 -0
  1224. data/spec/spec_tests/data/seed_list_discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet-txt.yml +5 -0
  1225. data/spec/spec_tests/data/seed_list_discovery/replica-set/srvMaxHosts-conflicts_with_replicaSet.yml +5 -0
  1226. data/spec/spec_tests/data/seed_list_discovery/replica-set/srvMaxHosts-equal_to_srv_records.yml +16 -0
  1227. data/spec/spec_tests/data/seed_list_discovery/replica-set/srvMaxHosts-greater_than_srv_records.yml +15 -0
  1228. data/spec/spec_tests/data/seed_list_discovery/replica-set/srvMaxHosts-less_than_srv_records.yml +15 -0
  1229. data/spec/spec_tests/data/seed_list_discovery/replica-set/srvMaxHosts-zero-txt.yml +15 -0
  1230. data/spec/spec_tests/data/seed_list_discovery/replica-set/srvMaxHosts-zero.yml +15 -0
  1231. data/spec/spec_tests/data/seed_list_discovery/sharded/srvMaxHosts-equal_to_srv_records.yml +13 -0
  1232. data/spec/spec_tests/data/seed_list_discovery/sharded/srvMaxHosts-greater_than_srv_records.yml +12 -0
  1233. data/spec/spec_tests/data/seed_list_discovery/sharded/srvMaxHosts-less_than_srv_records.yml +10 -0
  1234. data/spec/spec_tests/data/seed_list_discovery/sharded/srvMaxHosts-zero.yml +11 -0
  1235. data/spec/spec_tests/data/server_selection/Unknown/read/ghost.yml +11 -0
  1236. data/spec/spec_tests/data/server_selection/Unknown/write/ghost.yml +11 -0
  1237. data/spec/spec_tests/data/sessions_unified/driver-sessions-dirty-session-errors.yml +351 -0
  1238. data/spec/spec_tests/data/sessions_unified/driver-sessions-server-support.yml +123 -0
  1239. data/spec/spec_tests/data/sessions_unified/implicit-sessions-default-causal-consistency.yml +119 -0
  1240. data/spec/spec_tests/data/sessions_unified/snapshot-sessions-not-supported-client-error.yml +9 -3
  1241. data/spec/spec_tests/data/sessions_unified/snapshot-sessions-unsupported-ops.yml +1 -1
  1242. data/spec/spec_tests/data/sessions_unified/snapshot-sessions.yml +1 -1
  1243. data/spec/spec_tests/data/transactions/error-labels.yml +1 -1
  1244. data/spec/spec_tests/data/transactions/errors-client.yml +8 -9
  1245. data/spec/spec_tests/data/transactions/mongos-recovery-token.yml +1 -1
  1246. data/spec/spec_tests/data/transactions/retryable-abort-errorLabels.yml +0 -2
  1247. data/spec/spec_tests/data/transactions/retryable-abort.yml +7 -9
  1248. data/spec/spec_tests/data/transactions/retryable-commit-errorLabels.yml +0 -2
  1249. data/spec/spec_tests/data/transactions/retryable-commit.yml +7 -9
  1250. data/spec/spec_tests/data/transactions/retryable-writes.yml +0 -2
  1251. data/spec/spec_tests/data/transactions_unified/do-not-retry-read-in-transaction.yml +64 -0
  1252. data/spec/spec_tests/data/transactions_unified/mongos-unpin.yml +1 -1
  1253. data/spec/spec_tests/data/transactions_unified/retryable-abort-handshake.yml +118 -0
  1254. data/spec/spec_tests/data/transactions_unified/retryable-commit-handshake.yml +118 -0
  1255. data/spec/spec_tests/data/unified/valid-fail/entity-findCursor-malformed.yml +31 -0
  1256. data/spec/spec_tests/data/unified/valid-fail/entity-findCursor.yml +31 -0
  1257. data/spec/spec_tests/data/unified/valid-fail/ignoreResultAndError-malformed.yml +34 -0
  1258. data/spec/spec_tests/data/unified/valid-fail/ignoreResultAndError.yml +35 -0
  1259. data/spec/spec_tests/data/unified/valid-fail/operation-unsupported.yml +13 -0
  1260. data/spec/spec_tests/data/unified/valid-pass/assertNumberConnectionsCheckedOut.yml +17 -0
  1261. data/spec/spec_tests/data/unified/valid-pass/collectionData-createOptions.yml +37 -0
  1262. data/spec/spec_tests/data/unified/valid-pass/entity-client-cmap-events.yml +40 -0
  1263. data/spec/spec_tests/data/unified/valid-pass/entity-client-storeEventsAsEntities.yml +37 -0
  1264. data/spec/spec_tests/data/unified/valid-pass/expectedError-errorResponse.yml +39 -0
  1265. data/spec/spec_tests/data/unified/valid-pass/expectedEventsForClient-eventType.yml +66 -0
  1266. data/spec/spec_tests/data/unified/valid-pass/expectedEventsForClient-ignoreExtraEvents.yml +78 -0
  1267. data/spec/spec_tests/data/unified/valid-pass/ignoreResultAndError.yml +34 -0
  1268. data/spec/spec_tests/data/unified/valid-pass/observeSensitiveCommands.yml +255 -0
  1269. data/spec/spec_tests/data/unified/valid-pass/poc-change-streams.yml +22 -1
  1270. data/spec/spec_tests/data/unified/valid-pass/poc-command-monitoring.yml +3 -3
  1271. data/spec/spec_tests/data/unified/valid-pass/poc-crud.yml +19 -13
  1272. data/spec/spec_tests/data/unified/valid-pass/poc-retryable-reads.yml +3 -3
  1273. data/spec/spec_tests/data/unified/valid-pass/poc-retryable-writes.yml +9 -9
  1274. data/spec/spec_tests/data/unified/valid-pass/poc-sessions.yml +3 -4
  1275. data/spec/spec_tests/data/unified/valid-pass/poc-transactions-convenient-api.yml +1 -1
  1276. data/spec/spec_tests/data/unified/valid-pass/poc-transactions-mongos-pin-auto.yml +1 -1
  1277. data/spec/spec_tests/data/unified/valid-pass/poc-transactions.yml +6 -5
  1278. data/spec/spec_tests/data/uri_options/srv-options.yml +96 -0
  1279. data/spec/spec_tests/data/versioned_api/crud-api-version-1-strict.yml +6 -4
  1280. data/spec/spec_tests/data/versioned_api/crud-api-version-1.yml +7 -5
  1281. data/spec/spec_tests/data/versioned_api/transaction-handling.yml +4 -4
  1282. data/spec/spec_tests/gridfs_spec.rb +1 -1
  1283. data/spec/spec_tests/gridfs_unified_spec.rb +13 -0
  1284. data/spec/spec_tests/index_management_unified_spec.rb +13 -0
  1285. data/spec/spec_tests/load_balancers_spec.rb +1 -1
  1286. data/spec/spec_tests/max_staleness_spec.rb +1 -1
  1287. data/spec/spec_tests/read_write_concern_connection_string_spec.rb +1 -1
  1288. data/spec/spec_tests/read_write_concern_document_spec.rb +1 -1
  1289. data/spec/spec_tests/read_write_concern_operaton_spec.rb +1 -1
  1290. data/spec/spec_tests/retryable_reads_spec.rb +7 -2
  1291. data/spec/spec_tests/retryable_reads_unified_spec.rb +22 -0
  1292. data/spec/spec_tests/retryable_writes_spec.rb +5 -2
  1293. data/spec/spec_tests/retryable_writes_unified_spec.rb +21 -0
  1294. data/spec/spec_tests/run_command_unified_spec.rb +13 -0
  1295. data/spec/spec_tests/sdam_monitoring_spec.rb +1 -1
  1296. data/spec/spec_tests/sdam_spec.rb +5 -1
  1297. data/spec/spec_tests/sdam_unified_spec.rb +15 -0
  1298. data/spec/spec_tests/seed_list_discovery_spec.rb +11 -2
  1299. data/spec/spec_tests/server_selection_rtt_spec.rb +7 -7
  1300. data/spec/spec_tests/server_selection_spec.rb +1 -1
  1301. data/spec/spec_tests/sessions_unified_spec.rb +1 -1
  1302. data/spec/spec_tests/transactions_api_spec.rb +1 -1
  1303. data/spec/spec_tests/transactions_spec.rb +1 -1
  1304. data/spec/spec_tests/transactions_unified_spec.rb +3 -2
  1305. data/spec/spec_tests/unified_spec.rb +2 -2
  1306. data/spec/spec_tests/uri_options_spec.rb +1 -1
  1307. data/spec/spec_tests/versioned_api_spec.rb +1 -1
  1308. data/spec/stress/cleanup_spec.rb +1 -1
  1309. data/spec/stress/connection_pool_stress_spec.rb +1 -62
  1310. data/spec/stress/connection_pool_timing_spec.rb +12 -36
  1311. data/spec/stress/fork_reconnect_stress_spec.rb +10 -10
  1312. data/spec/stress/push_monitor_close_spec.rb +1 -1
  1313. data/spec/support/authorization.rb +2 -2
  1314. data/spec/support/aws_utils/base.rb +1 -1
  1315. data/spec/support/aws_utils/inspector.rb +1 -1
  1316. data/spec/support/aws_utils/orchestrator.rb +20 -8
  1317. data/spec/support/aws_utils/provisioner.rb +1 -1
  1318. data/spec/support/aws_utils.rb +4 -3
  1319. data/spec/support/background_thread_registry.rb +4 -14
  1320. data/spec/support/certificates/atlas-ocsp-ca.crt +89 -79
  1321. data/spec/support/certificates/atlas-ocsp.crt +117 -122
  1322. data/spec/support/certificates/retrieve-atlas-cert +40 -0
  1323. data/spec/support/client_registry.rb +6 -2
  1324. data/spec/support/client_registry_macros.rb +1 -1
  1325. data/spec/support/cluster_tools.rb +17 -12
  1326. data/spec/support/common_shortcuts.rb +53 -6
  1327. data/spec/support/constraints.rb +21 -1
  1328. data/spec/support/crypt/corpus/corpus-encrypted.json +9515 -0
  1329. data/spec/support/crypt/corpus/corpus-key-aws.json +32 -32
  1330. data/spec/support/crypt/corpus/corpus-key-azure.json +33 -0
  1331. data/spec/support/crypt/corpus/corpus-key-gcp.json +35 -0
  1332. data/spec/support/crypt/corpus/corpus-key-kmip.json +32 -0
  1333. data/spec/support/crypt/corpus/corpus-key-local.json +30 -30
  1334. data/spec/support/crypt/corpus/corpus-schema.json +4399 -121
  1335. data/spec/support/crypt/corpus/corpus.json +4999 -37
  1336. data/spec/support/crypt/data_keys/key_document_azure.json +33 -0
  1337. data/spec/support/crypt/data_keys/key_document_gcp.json +37 -0
  1338. data/spec/support/crypt/data_keys/key_document_kmip.json +32 -0
  1339. data/spec/support/crypt/encrypted_fields/encryptedFields.json +32 -0
  1340. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Date.json +30 -0
  1341. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalNoPrecision.json +21 -0
  1342. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalPrecision.json +29 -0
  1343. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoubleNoPrecision.json +21 -0
  1344. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoublePrecision.json +30 -0
  1345. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Int.json +27 -0
  1346. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Long.json +27 -0
  1347. data/spec/support/crypt/keys/key1-document.json +30 -0
  1348. data/spec/support/crypt/schema_maps/schema_map_azure.json +17 -0
  1349. data/spec/support/crypt/schema_maps/schema_map_azure_key_alt_names.json +12 -0
  1350. data/spec/support/crypt/schema_maps/schema_map_gcp.json +17 -0
  1351. data/spec/support/crypt/schema_maps/schema_map_gcp_key_alt_names.json +12 -0
  1352. data/spec/support/crypt/schema_maps/schema_map_kmip.json +17 -0
  1353. data/spec/support/crypt/schema_maps/schema_map_kmip_key_alt_names.json +12 -0
  1354. data/spec/support/crypt.rb +269 -14
  1355. data/spec/support/dns.rb +1 -1
  1356. data/spec/support/json_ext_formatter.rb +1 -1
  1357. data/spec/support/keyword_struct.rb +1 -1
  1358. data/spec/support/local_resource_registry.rb +1 -1
  1359. data/spec/support/macros.rb +29 -0
  1360. data/spec/support/matchers.rb +5 -5
  1361. data/spec/support/mongos_macros.rb +24 -0
  1362. data/spec/support/monitoring_ext.rb +1 -1
  1363. data/spec/support/ocsp +1 -1
  1364. data/spec/support/primary_socket.rb +1 -1
  1365. data/spec/support/recording_logger.rb +27 -0
  1366. data/spec/support/sdam_formatter_integration.rb +1 -1
  1367. data/spec/support/shared/app_metadata.rb +15 -3
  1368. data/spec/support/shared/auth_context.rb +1 -0
  1369. data/spec/support/shared/protocol.rb +1 -1
  1370. data/spec/support/shared/scram_conversation.rb +3 -2
  1371. data/spec/support/shared/server_selector.rb +1 -1
  1372. data/spec/support/shared/session.rb +16 -10
  1373. data/spec/support/spec_config.rb +133 -2
  1374. data/spec/support/spec_setup.rb +3 -3
  1375. data/spec/support/using_hash.rb +11 -2
  1376. data/spec/support/utils.rb +280 -229
  1377. metadata +1790 -1289
  1378. checksums.yaml.gz.sig +0 -0
  1379. data/lib/mongo/operation/aggregate/command.rb +0 -55
  1380. data/lib/mongo/operation/collections_info/command.rb +0 -48
  1381. data/lib/mongo/operation/count/command.rb +0 -47
  1382. data/lib/mongo/operation/create/command.rb +0 -47
  1383. data/lib/mongo/operation/create_index/command.rb +0 -61
  1384. data/lib/mongo/operation/delete/command.rb +0 -52
  1385. data/lib/mongo/operation/delete/legacy.rb +0 -64
  1386. data/lib/mongo/operation/distinct/command.rb +0 -47
  1387. data/lib/mongo/operation/explain/command.rb +0 -58
  1388. data/lib/mongo/operation/explain/legacy.rb +0 -52
  1389. data/lib/mongo/operation/find/builder/legacy.rb +0 -123
  1390. data/lib/mongo/operation/find/command.rb +0 -51
  1391. data/lib/mongo/operation/find/legacy/result.rb +0 -46
  1392. data/lib/mongo/operation/find/legacy.rb +0 -52
  1393. data/lib/mongo/operation/get_more/command.rb +0 -43
  1394. data/lib/mongo/operation/indexes/command.rb +0 -42
  1395. data/lib/mongo/operation/indexes/legacy.rb +0 -48
  1396. data/lib/mongo/operation/insert/command.rb +0 -59
  1397. data/lib/mongo/operation/insert/legacy.rb +0 -68
  1398. data/lib/mongo/operation/kill_cursors/command.rb +0 -48
  1399. data/lib/mongo/operation/list_collections/command.rb +0 -46
  1400. data/lib/mongo/operation/map_reduce/command.rb +0 -51
  1401. data/lib/mongo/operation/parallel_scan/command.rb +0 -57
  1402. data/lib/mongo/operation/remove_user/command.rb +0 -46
  1403. data/lib/mongo/operation/shared/op_msg_or_find_command.rb +0 -44
  1404. data/lib/mongo/operation/update/command.rb +0 -53
  1405. data/lib/mongo/operation/update/legacy/result.rb +0 -112
  1406. data/lib/mongo/operation/update/legacy.rb +0 -76
  1407. data/lib/mongo/operation/users_info/command.rb +0 -46
  1408. data/lib/mongo/operation/write_command/command.rb +0 -51
  1409. data/lib/mongo/protocol/delete.rb +0 -172
  1410. data/lib/mongo/protocol/insert.rb +0 -181
  1411. data/lib/mongo/protocol/update.rb +0 -214
  1412. data/spec/mongo/dbref_spec.rb +0 -152
  1413. data/spec/mongo/operation/delete/command_spec.rb +0 -115
  1414. data/spec/mongo/operation/find/legacy_spec.rb +0 -131
  1415. data/spec/mongo/operation/get_more_spec.rb +0 -63
  1416. data/spec/mongo/operation/insert/command_spec.rb +0 -118
  1417. data/spec/mongo/operation/kill_cursors_spec.rb +0 -47
  1418. data/spec/mongo/operation/update/command_spec.rb +0 -122
  1419. data/spec/mongo/protocol/delete_spec.rb +0 -185
  1420. data/spec/mongo/protocol/insert_spec.rb +0 -179
  1421. data/spec/mongo/protocol/update_spec.rb +0 -204
  1422. data/spec/mongo/server/round_trip_time_averager_spec.rb +0 -48
  1423. data/spec/shared/LICENSE +0 -20
  1424. data/spec/shared/bin/get-mongodb-download-url +0 -17
  1425. data/spec/shared/bin/s3-copy +0 -45
  1426. data/spec/shared/bin/s3-upload +0 -69
  1427. data/spec/shared/lib/mrss/child_process_helper.rb +0 -80
  1428. data/spec/shared/lib/mrss/cluster_config.rb +0 -231
  1429. data/spec/shared/lib/mrss/constraints.rb +0 -385
  1430. data/spec/shared/lib/mrss/docker_runner.rb +0 -271
  1431. data/spec/shared/lib/mrss/event_subscriber.rb +0 -200
  1432. data/spec/shared/lib/mrss/lite_constraints.rb +0 -191
  1433. data/spec/shared/lib/mrss/server_version_registry.rb +0 -120
  1434. data/spec/shared/lib/mrss/spec_organizer.rb +0 -179
  1435. data/spec/shared/lib/mrss/utils.rb +0 -15
  1436. data/spec/shared/share/Dockerfile.erb +0 -323
  1437. data/spec/shared/share/haproxy-1.conf +0 -16
  1438. data/spec/shared/share/haproxy-2.conf +0 -17
  1439. data/spec/shared/shlib/distro.sh +0 -73
  1440. data/spec/shared/shlib/server.sh +0 -367
  1441. data/spec/shared/shlib/set_env.sh +0 -131
  1442. data/spec/spec_tests/change_streams_spec.rb +0 -93
  1443. data/spec/spec_tests/command_monitoring_spec.rb +0 -71
  1444. data/spec/spec_tests/data/change_streams/change-streams-errors.yml +0 -101
  1445. data/spec/spec_tests/data/change_streams/change-streams-resume-allowlist.yml +0 -1173
  1446. data/spec/spec_tests/data/change_streams/change-streams-resume-errorLabels.yml +0 -1105
  1447. data/spec/spec_tests/data/change_streams/change-streams.yml +0 -535
  1448. data/spec/spec_tests/data/command_monitoring/bulkWrite.yml +0 -49
  1449. data/spec/spec_tests/data/command_monitoring/command.yml +0 -61
  1450. data/spec/spec_tests/data/command_monitoring/deleteMany.yml +0 -55
  1451. data/spec/spec_tests/data/command_monitoring/deleteOne.yml +0 -55
  1452. data/spec/spec_tests/data/command_monitoring/find.yml +0 -266
  1453. data/spec/spec_tests/data/command_monitoring/insertMany.yml +0 -75
  1454. data/spec/spec_tests/data/command_monitoring/insertOne.yml +0 -51
  1455. data/spec/spec_tests/data/command_monitoring/unacknowledgedBulkWrite.yml +0 -34
  1456. data/spec/spec_tests/data/command_monitoring/updateMany.yml +0 -65
  1457. data/spec/spec_tests/data/command_monitoring/updateOne.yml +0 -90
  1458. data/spec/spec_tests/data/crud_v2/aggregate-merge.yml +0 -103
  1459. data/spec/spec_tests/data/crud_v2/aggregate-out-readConcern.yml +0 -111
  1460. data/spec/spec_tests/data/crud_v2/bulkWrite-arrayFilters.yml +0 -103
  1461. data/spec/spec_tests/data/crud_v2/bulkWrite-delete-hint-clientError.yml +0 -63
  1462. data/spec/spec_tests/data/crud_v2/bulkWrite-delete-hint-serverError.yml +0 -92
  1463. data/spec/spec_tests/data/crud_v2/bulkWrite-delete-hint.yml +0 -103
  1464. data/spec/spec_tests/data/crud_v2/bulkWrite-update-hint-clientError.yml +0 -90
  1465. data/spec/spec_tests/data/crud_v2/bulkWrite-update-hint-serverError.yml +0 -147
  1466. data/spec/spec_tests/data/crud_v2/bulkWrite-update-hint.yml +0 -164
  1467. data/spec/spec_tests/data/crud_v2/db-aggregate.yml +0 -39
  1468. data/spec/spec_tests/data/crud_v2/deleteMany-hint-clientError.yml +0 -43
  1469. data/spec/spec_tests/data/crud_v2/deleteMany-hint-serverError.yml +0 -62
  1470. data/spec/spec_tests/data/crud_v2/deleteMany-hint.yml +0 -58
  1471. data/spec/spec_tests/data/crud_v2/deleteOne-hint-clientError.yml +0 -41
  1472. data/spec/spec_tests/data/crud_v2/deleteOne-hint-serverError.yml +0 -60
  1473. data/spec/spec_tests/data/crud_v2/deleteOne-hint.yml +0 -57
  1474. data/spec/spec_tests/data/crud_v2/find-allowdiskuse-clientError.yml +0 -28
  1475. data/spec/spec_tests/data/crud_v2/find-allowdiskuse-serverError.yml +0 -44
  1476. data/spec/spec_tests/data/crud_v2/find-allowdiskuse.yml +0 -50
  1477. data/spec/spec_tests/data/crud_v2/findOneAndDelete-hint-clientError.yml +0 -45
  1478. data/spec/spec_tests/data/crud_v2/findOneAndDelete-hint-serverError.yml +0 -60
  1479. data/spec/spec_tests/data/crud_v2/findOneAndDelete-hint.yml +0 -56
  1480. data/spec/spec_tests/data/crud_v2/findOneAndReplace-hint-clientError.yml +0 -40
  1481. data/spec/spec_tests/data/crud_v2/findOneAndReplace-hint-serverError.yml +0 -59
  1482. data/spec/spec_tests/data/crud_v2/findOneAndReplace-hint.yml +0 -55
  1483. data/spec/spec_tests/data/crud_v2/findOneAndUpdate-hint-clientError.yml +0 -40
  1484. data/spec/spec_tests/data/crud_v2/findOneAndUpdate-hint-serverError.yml +0 -58
  1485. data/spec/spec_tests/data/crud_v2/findOneAndUpdate-hint.yml +0 -55
  1486. data/spec/spec_tests/data/crud_v2/replaceOne-hint.yml +0 -61
  1487. data/spec/spec_tests/data/crud_v2/unacknowledged-bulkWrite-delete-hint-clientError.yml +0 -60
  1488. data/spec/spec_tests/data/crud_v2/unacknowledged-bulkWrite-update-hint-clientError.yml +0 -88
  1489. data/spec/spec_tests/data/crud_v2/unacknowledged-deleteMany-hint-clientError.yml +0 -40
  1490. data/spec/spec_tests/data/crud_v2/unacknowledged-deleteOne-hint-clientError.yml +0 -38
  1491. data/spec/spec_tests/data/crud_v2/unacknowledged-findOneAndDelete-hint-clientError.yml +0 -42
  1492. data/spec/spec_tests/data/crud_v2/unacknowledged-findOneAndReplace-hint-clientError.yml +0 -40
  1493. data/spec/spec_tests/data/crud_v2/unacknowledged-findOneAndUpdate-hint-clientError.yml +0 -40
  1494. data/spec/spec_tests/data/crud_v2/unacknowledged-replaceOne-hint-clientError.yml +0 -40
  1495. data/spec/spec_tests/data/crud_v2/unacknowledged-updateMany-hint-clientError.yml +0 -43
  1496. data/spec/spec_tests/data/crud_v2/unacknowledged-updateOne-hint-clientError.yml +0 -40
  1497. data/spec/spec_tests/data/crud_v2/updateMany-hint-clientError.yml +0 -45
  1498. data/spec/spec_tests/data/crud_v2/updateMany-hint-serverError.yml +0 -66
  1499. data/spec/spec_tests/data/crud_v2/updateMany-hint.yml +0 -65
  1500. data/spec/spec_tests/data/crud_v2/updateOne-hint-clientError.yml +0 -43
  1501. data/spec/spec_tests/data/crud_v2/updateOne-hint-serverError.yml +0 -62
  1502. data/spec/spec_tests/data/crud_v2/updateOne-hint.yml +0 -61
  1503. data/spec/spec_tests/data/crud_v2/updateWithPipelines.yml +0 -157
  1504. data/spec/spec_tests/data/retryable_reads/estimatedDocumentCount-4.9.yml +0 -60
  1505. data/spec/spec_tests/data/retryable_reads/estimatedDocumentCount-serverErrors-4.9.yml +0 -146
  1506. data/spec/spec_tests/data/sdam_integration/cancel-server-check.yml +0 -96
  1507. data/spec/spec_tests/data/sdam_integration/connectTimeoutMS.yml +0 -88
  1508. data/spec/spec_tests/data/sdam_integration/find-network-error.yml +0 -85
  1509. data/spec/spec_tests/data/sdam_integration/find-shutdown-error.yml +0 -118
  1510. data/spec/spec_tests/data/sdam_integration/hello-command-error.yml +0 -160
  1511. data/spec/spec_tests/data/sdam_integration/hello-network-error.yml +0 -158
  1512. data/spec/spec_tests/data/sdam_integration/hello-timeout.yml +0 -225
  1513. data/spec/spec_tests/data/sdam_integration/insert-network-error.yml +0 -88
  1514. data/spec/spec_tests/data/sdam_integration/insert-shutdown-error.yml +0 -117
  1515. data/spec/spec_tests/data/sdam_integration/rediscover-quickly-after-step-down.yml +0 -98
  1516. data/spec/spec_tests/sdam_integration_spec.rb +0 -16
  1517. data/spec/support/crypt/corpus/corpus_encrypted.json +0 -4152
  1518. data/spec/support/session_registry.rb +0 -55
  1519. data.tar.gz.sig +0 -0
  1520. metadata.gz.sig +0 -0
  1521. /data/spec/spec_tests/data/retryable_reads/{aggregate-merge.yml → legacy/aggregate-merge.yml} +0 -0
  1522. /data/spec/spec_tests/data/retryable_reads/{aggregate-serverErrors.yml → legacy/aggregate-serverErrors.yml} +0 -0
  1523. /data/spec/spec_tests/data/retryable_reads/{aggregate.yml → legacy/aggregate.yml} +0 -0
  1524. /data/spec/spec_tests/data/retryable_reads/{changeStreams-client.watch-serverErrors.yml → legacy/changeStreams-client.watch-serverErrors.yml} +0 -0
  1525. /data/spec/spec_tests/data/retryable_reads/{changeStreams-client.watch.yml → legacy/changeStreams-client.watch.yml} +0 -0
  1526. /data/spec/spec_tests/data/retryable_reads/{changeStreams-db.coll.watch-serverErrors.yml → legacy/changeStreams-db.coll.watch-serverErrors.yml} +0 -0
  1527. /data/spec/spec_tests/data/retryable_reads/{changeStreams-db.coll.watch.yml → legacy/changeStreams-db.coll.watch.yml} +0 -0
  1528. /data/spec/spec_tests/data/retryable_reads/{changeStreams-db.watch-serverErrors.yml → legacy/changeStreams-db.watch-serverErrors.yml} +0 -0
  1529. /data/spec/spec_tests/data/retryable_reads/{changeStreams-db.watch.yml → legacy/changeStreams-db.watch.yml} +0 -0
  1530. /data/spec/spec_tests/data/retryable_reads/{count-serverErrors.yml → legacy/count-serverErrors.yml} +0 -0
  1531. /data/spec/spec_tests/data/retryable_reads/{count.yml → legacy/count.yml} +0 -0
  1532. /data/spec/spec_tests/data/retryable_reads/{countDocuments-serverErrors.yml → legacy/countDocuments-serverErrors.yml} +0 -0
  1533. /data/spec/spec_tests/data/retryable_reads/{countDocuments.yml → legacy/countDocuments.yml} +0 -0
  1534. /data/spec/spec_tests/data/retryable_reads/{distinct-serverErrors.yml → legacy/distinct-serverErrors.yml} +0 -0
  1535. /data/spec/spec_tests/data/retryable_reads/{distinct.yml → legacy/distinct.yml} +0 -0
  1536. /data/spec/spec_tests/data/retryable_reads/{find-serverErrors.yml → legacy/find-serverErrors.yml} +0 -0
  1537. /data/spec/spec_tests/data/retryable_reads/{find.yml → legacy/find.yml} +0 -0
  1538. /data/spec/spec_tests/data/retryable_reads/{findOne-serverErrors.yml → legacy/findOne-serverErrors.yml} +0 -0
  1539. /data/spec/spec_tests/data/retryable_reads/{findOne.yml → legacy/findOne.yml} +0 -0
  1540. /data/spec/spec_tests/data/retryable_reads/{gridfs-download-serverErrors.yml → legacy/gridfs-download-serverErrors.yml} +0 -0
  1541. /data/spec/spec_tests/data/retryable_reads/{gridfs-download.yml → legacy/gridfs-download.yml} +0 -0
  1542. /data/spec/spec_tests/data/retryable_reads/{gridfs-downloadByName-serverErrors.yml → legacy/gridfs-downloadByName-serverErrors.yml} +0 -0
  1543. /data/spec/spec_tests/data/retryable_reads/{gridfs-downloadByName.yml → legacy/gridfs-downloadByName.yml} +0 -0
  1544. /data/spec/spec_tests/data/retryable_reads/{listCollectionNames-serverErrors.yml → legacy/listCollectionNames-serverErrors.yml} +0 -0
  1545. /data/spec/spec_tests/data/retryable_reads/{listCollectionNames.yml → legacy/listCollectionNames.yml} +0 -0
  1546. /data/spec/spec_tests/data/retryable_reads/{listCollectionObjects-serverErrors.yml → legacy/listCollectionObjects-serverErrors.yml} +0 -0
  1547. /data/spec/spec_tests/data/retryable_reads/{listCollectionObjects.yml → legacy/listCollectionObjects.yml} +0 -0
  1548. /data/spec/spec_tests/data/retryable_reads/{listCollections-serverErrors.yml → legacy/listCollections-serverErrors.yml} +0 -0
  1549. /data/spec/spec_tests/data/retryable_reads/{listCollections.yml → legacy/listCollections.yml} +0 -0
  1550. /data/spec/spec_tests/data/retryable_reads/{listDatabaseNames-serverErrors.yml → legacy/listDatabaseNames-serverErrors.yml} +0 -0
  1551. /data/spec/spec_tests/data/retryable_reads/{listDatabaseNames.yml → legacy/listDatabaseNames.yml} +0 -0
  1552. /data/spec/spec_tests/data/retryable_reads/{listDatabaseObjects-serverErrors.yml → legacy/listDatabaseObjects-serverErrors.yml} +0 -0
  1553. /data/spec/spec_tests/data/retryable_reads/{listDatabaseObjects.yml → legacy/listDatabaseObjects.yml} +0 -0
  1554. /data/spec/spec_tests/data/retryable_reads/{listDatabases-serverErrors.yml → legacy/listDatabases-serverErrors.yml} +0 -0
  1555. /data/spec/spec_tests/data/retryable_reads/{listDatabases.yml → legacy/listDatabases.yml} +0 -0
  1556. /data/spec/spec_tests/data/retryable_reads/{listIndexNames-serverErrors.yml → legacy/listIndexNames-serverErrors.yml} +0 -0
  1557. /data/spec/spec_tests/data/retryable_reads/{listIndexNames.yml → legacy/listIndexNames.yml} +0 -0
  1558. /data/spec/spec_tests/data/retryable_reads/{listIndexes-serverErrors.yml → legacy/listIndexes-serverErrors.yml} +0 -0
  1559. /data/spec/spec_tests/data/retryable_reads/{listIndexes.yml → legacy/listIndexes.yml} +0 -0
  1560. /data/spec/spec_tests/data/retryable_reads/{mapReduce.yml → legacy/mapReduce.yml} +0 -0
  1561. /data/spec/spec_tests/data/retryable_writes/{bulkWrite-errorLabels.yml → legacy/bulkWrite-errorLabels.yml} +0 -0
  1562. /data/spec/spec_tests/data/retryable_writes/{bulkWrite.yml → legacy/bulkWrite.yml} +0 -0
  1563. /data/spec/spec_tests/data/retryable_writes/{deleteMany.yml → legacy/deleteMany.yml} +0 -0
  1564. /data/spec/spec_tests/data/retryable_writes/{deleteOne-errorLabels.yml → legacy/deleteOne-errorLabels.yml} +0 -0
  1565. /data/spec/spec_tests/data/retryable_writes/{deleteOne.yml → legacy/deleteOne.yml} +0 -0
  1566. /data/spec/spec_tests/data/retryable_writes/{findOneAndDelete-errorLabels.yml → legacy/findOneAndDelete-errorLabels.yml} +0 -0
  1567. /data/spec/spec_tests/data/retryable_writes/{findOneAndDelete.yml → legacy/findOneAndDelete.yml} +0 -0
  1568. /data/spec/spec_tests/data/retryable_writes/{findOneAndReplace-errorLabels.yml → legacy/findOneAndReplace-errorLabels.yml} +0 -0
  1569. /data/spec/spec_tests/data/retryable_writes/{findOneAndReplace.yml → legacy/findOneAndReplace.yml} +0 -0
  1570. /data/spec/spec_tests/data/retryable_writes/{findOneAndUpdate-errorLabels.yml → legacy/findOneAndUpdate-errorLabels.yml} +0 -0
  1571. /data/spec/spec_tests/data/retryable_writes/{findOneAndUpdate.yml → legacy/findOneAndUpdate.yml} +0 -0
  1572. /data/spec/spec_tests/data/retryable_writes/{insertMany-errorLabels.yml → legacy/insertMany-errorLabels.yml} +0 -0
  1573. /data/spec/spec_tests/data/retryable_writes/{insertMany.yml → legacy/insertMany.yml} +0 -0
  1574. /data/spec/spec_tests/data/retryable_writes/{insertOne-errorLabels.yml → legacy/insertOne-errorLabels.yml} +0 -0
  1575. /data/spec/spec_tests/data/retryable_writes/{insertOne.yml → legacy/insertOne.yml} +0 -0
  1576. /data/spec/spec_tests/data/retryable_writes/{replaceOne-errorLabels.yml → legacy/replaceOne-errorLabels.yml} +0 -0
  1577. /data/spec/spec_tests/data/retryable_writes/{replaceOne.yml → legacy/replaceOne.yml} +0 -0
  1578. /data/spec/spec_tests/data/retryable_writes/{updateMany.yml → legacy/updateMany.yml} +0 -0
  1579. /data/spec/spec_tests/data/retryable_writes/{updateOne-errorLabels.yml → legacy/updateOne-errorLabels.yml} +0 -0
  1580. /data/spec/spec_tests/data/retryable_writes/{updateOne.yml → legacy/updateOne.yml} +0 -0
@@ -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
+