mongo 2.15.1 → 2.16.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (326) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.md +1 -1
  4. data/lib/mongo/bulk_write.rb +2 -2
  5. data/lib/mongo/client.rb +45 -5
  6. data/lib/mongo/cluster/periodic_executor.rb +4 -3
  7. data/lib/mongo/cluster/reapers/cursor_reaper.rb +76 -43
  8. data/lib/mongo/cluster/sdam_flow.rb +9 -3
  9. data/lib/mongo/cluster/topology/base.rb +13 -9
  10. data/lib/mongo/cluster/topology/load_balanced.rb +102 -0
  11. data/lib/mongo/cluster/topology.rb +28 -8
  12. data/lib/mongo/cluster.rb +136 -51
  13. data/lib/mongo/collection/view/aggregation.rb +5 -10
  14. data/lib/mongo/collection/view/builder/aggregation.rb +6 -5
  15. data/lib/mongo/collection/view/builder/map_reduce.rb +12 -49
  16. data/lib/mongo/collection/view/builder.rb +0 -4
  17. data/lib/mongo/collection/view/iterable.rb +42 -18
  18. data/lib/mongo/collection/view/map_reduce.rb +39 -15
  19. data/lib/mongo/collection/view/readable.rb +60 -51
  20. data/lib/mongo/collection/view/writable.rb +178 -175
  21. data/lib/mongo/collection/view.rb +15 -21
  22. data/lib/mongo/collection.rb +13 -13
  23. data/lib/mongo/cursor/kill_spec.rb +38 -0
  24. data/lib/mongo/cursor.rb +62 -31
  25. data/lib/mongo/database/view.rb +1 -1
  26. data/lib/mongo/error/bad_load_balancer_target.rb +26 -0
  27. data/lib/mongo/error/missing_service_id.rb +26 -0
  28. data/lib/mongo/error/no_service_connection_available.rb +49 -0
  29. data/lib/mongo/error/notable.rb +7 -0
  30. data/lib/mongo/error.rb +3 -0
  31. data/lib/mongo/grid/fs_bucket.rb +21 -2
  32. data/lib/mongo/id.rb +7 -5
  33. data/lib/mongo/index/view.rb +22 -41
  34. data/lib/mongo/monitoring/event/cmap/pool_cleared.rb +7 -4
  35. data/lib/mongo/monitoring/event/command_failed.rb +1 -1
  36. data/lib/mongo/monitoring/event/command_started.rb +2 -0
  37. data/lib/mongo/monitoring/publishable.rb +2 -2
  38. data/lib/mongo/operation/aggregate/command.rb +8 -0
  39. data/lib/mongo/operation/context.rb +19 -1
  40. data/lib/mongo/operation/count/command.rb +6 -0
  41. data/lib/mongo/operation/count/op_msg.rb +6 -0
  42. data/lib/mongo/operation/create/command.rb +7 -1
  43. data/lib/mongo/operation/create/op_msg.rb +7 -0
  44. data/lib/mongo/operation/create_index/command.rb +17 -1
  45. data/lib/mongo/operation/create_index/op_msg.rb +17 -4
  46. data/lib/mongo/operation/delete/command.rb +6 -3
  47. data/lib/mongo/operation/delete/legacy.rb +9 -2
  48. data/lib/mongo/operation/delete/op_msg.rb +8 -1
  49. data/lib/mongo/operation/distinct/command.rb +6 -0
  50. data/lib/mongo/operation/distinct/op_msg.rb +7 -0
  51. data/lib/mongo/operation/explain/command.rb +13 -1
  52. data/lib/mongo/operation/explain/legacy.rb +12 -5
  53. data/lib/mongo/operation/explain/op_msg.rb +9 -1
  54. data/lib/mongo/operation/find/builder/command.rb +110 -0
  55. data/lib/mongo/{collection/view → operation/find}/builder/flags.rb +10 -14
  56. data/lib/mongo/operation/find/builder/legacy.rb +123 -0
  57. data/lib/mongo/{collection/view → operation/find}/builder/modifiers.rb +31 -25
  58. data/lib/mongo/{cursor → operation/find}/builder.rb +4 -4
  59. data/lib/mongo/operation/find/command.rb +9 -0
  60. data/lib/mongo/operation/find/legacy.rb +10 -1
  61. data/lib/mongo/operation/find/op_msg.rb +12 -0
  62. data/lib/mongo/operation/find.rb +1 -0
  63. data/lib/mongo/operation/get_more/command.rb +1 -0
  64. data/lib/mongo/operation/get_more/command_builder.rb +38 -0
  65. data/lib/mongo/operation/get_more/op_msg.rb +1 -0
  66. data/lib/mongo/operation/get_more.rb +1 -0
  67. data/lib/mongo/operation/kill_cursors/command.rb +8 -0
  68. data/lib/mongo/operation/kill_cursors/command_builder.rb +35 -0
  69. data/lib/mongo/operation/kill_cursors/legacy.rb +2 -1
  70. data/lib/mongo/operation/kill_cursors/op_msg.rb +10 -0
  71. data/lib/mongo/operation/kill_cursors.rb +1 -0
  72. data/lib/mongo/operation/map_reduce/command.rb +8 -0
  73. data/lib/mongo/operation/map_reduce/op_msg.rb +1 -1
  74. data/lib/mongo/operation/shared/executable.rb +15 -1
  75. data/lib/mongo/operation/shared/polymorphic_operation.rb +1 -1
  76. data/lib/mongo/operation/shared/read_preference_supported.rb +3 -1
  77. data/lib/mongo/operation/shared/response_handling.rb +1 -0
  78. data/lib/mongo/operation/shared/sessions_supported.rb +12 -12
  79. data/lib/mongo/operation/shared/specifiable.rb +11 -29
  80. data/lib/mongo/operation/shared/validatable.rb +87 -0
  81. data/lib/mongo/operation/shared/write.rb +1 -1
  82. data/lib/mongo/operation/update/command.rb +6 -3
  83. data/lib/mongo/operation/update/legacy.rb +19 -11
  84. data/lib/mongo/operation/update/op_msg.rb +7 -4
  85. data/lib/mongo/operation/write_command/command.rb +51 -0
  86. data/lib/mongo/operation/write_command/op_msg.rb +43 -0
  87. data/lib/mongo/operation/write_command.rb +32 -0
  88. data/lib/mongo/operation.rb +10 -0
  89. data/lib/mongo/protocol/query.rb +35 -18
  90. data/lib/mongo/server/connection.rb +25 -3
  91. data/lib/mongo/server/connection_base.rb +12 -1
  92. data/lib/mongo/server/connection_common.rb +38 -1
  93. data/lib/mongo/server/connection_pool/generation_manager.rb +71 -0
  94. data/lib/mongo/server/connection_pool.rb +100 -27
  95. data/lib/mongo/server/description/features.rb +17 -16
  96. data/lib/mongo/server/description/load_balancer.rb +33 -0
  97. data/lib/mongo/server/description.rb +85 -6
  98. data/lib/mongo/server/monitor/connection.rb +5 -6
  99. data/lib/mongo/server/monitor.rb +2 -1
  100. data/lib/mongo/server/pending_connection.rb +47 -31
  101. data/lib/mongo/server.rb +73 -26
  102. data/lib/mongo/server_selector/base.rb +5 -1
  103. data/lib/mongo/session/session_pool.rb +11 -0
  104. data/lib/mongo/session.rb +21 -1
  105. data/lib/mongo/socket/ocsp_verifier.rb +6 -37
  106. data/lib/mongo/uri/options_mapper.rb +1 -0
  107. data/lib/mongo/uri/srv_protocol.rb +6 -8
  108. data/lib/mongo/uri.rb +18 -0
  109. data/lib/mongo/utils.rb +0 -7
  110. data/lib/mongo/version.rb +1 -1
  111. data/mongo.gemspec +1 -1
  112. data/spec/integration/auth_spec.rb +31 -1
  113. data/spec/integration/awaited_ismaster_spec.rb +1 -1
  114. data/spec/integration/bulk_write_spec.rb +1 -1
  115. data/spec/integration/change_stream_spec.rb +3 -3
  116. data/spec/integration/client_construction_spec.rb +54 -0
  117. data/spec/integration/client_side_encryption/auto_encryption_bulk_writes_spec.rb +1 -1
  118. data/spec/integration/client_side_encryption/auto_encryption_command_monitoring_spec.rb +1 -1
  119. data/spec/integration/client_side_encryption/bson_size_limit_spec.rb +1 -1
  120. data/spec/integration/client_side_encryption/data_key_spec.rb +1 -1
  121. data/spec/integration/client_spec.rb +2 -0
  122. data/spec/integration/command_monitoring_spec.rb +1 -1
  123. data/spec/integration/command_spec.rb +1 -1
  124. data/spec/integration/connection_spec.rb +52 -35
  125. data/spec/integration/crud_spec.rb +174 -1
  126. data/spec/integration/cursor_pinning_spec.rb +121 -0
  127. data/spec/integration/cursor_reaping_spec.rb +8 -4
  128. data/spec/integration/fork_reconnect_spec.rb +1 -5
  129. data/spec/integration/get_more_spec.rb +1 -1
  130. data/spec/integration/heartbeat_events_spec.rb +1 -1
  131. data/spec/integration/map_reduce_spec.rb +77 -0
  132. data/spec/integration/query_cache_spec.rb +2 -2
  133. data/spec/integration/query_cache_transactions_spec.rb +1 -1
  134. data/spec/integration/read_concern_spec.rb +1 -1
  135. data/spec/integration/read_preference_spec.rb +1 -1
  136. data/spec/integration/reconnect_spec.rb +30 -12
  137. data/spec/integration/retryable_errors_spec.rb +1 -1
  138. data/spec/integration/retryable_writes/retryable_writes_36_and_older_spec.rb +1 -1
  139. data/spec/integration/retryable_writes/retryable_writes_40_and_newer_spec.rb +1 -1
  140. data/spec/integration/sdam_error_handling_spec.rb +5 -3
  141. data/spec/integration/sdam_events_spec.rb +35 -19
  142. data/spec/integration/sdam_prose_spec.rb +1 -1
  143. data/spec/integration/server_monitor_spec.rb +1 -0
  144. data/spec/integration/server_selector_spec.rb +22 -5
  145. data/spec/integration/server_spec.rb +2 -0
  146. data/spec/integration/srv_monitoring_spec.rb +1 -1
  147. data/spec/integration/step_down_spec.rb +1 -1
  148. data/spec/integration/transaction_pinning_spec.rb +120 -0
  149. data/spec/integration/versioned_api_examples_spec.rb +45 -0
  150. data/spec/integration/x509_auth_spec.rb +1 -1
  151. data/spec/lite_spec_helper.rb +1 -2
  152. data/spec/mongo/address/unix_spec.rb +1 -0
  153. data/spec/mongo/auth/cr_spec.rb +2 -3
  154. data/spec/mongo/auth/ldap_spec.rb +2 -3
  155. data/spec/mongo/auth/scram_spec.rb +2 -3
  156. data/spec/mongo/auth/user/view_spec.rb +1 -1
  157. data/spec/mongo/auth/x509_spec.rb +2 -3
  158. data/spec/mongo/bulk_write_spec.rb +3 -3
  159. data/spec/mongo/client_construction_spec.rb +259 -28
  160. data/spec/mongo/client_spec.rb +6 -4
  161. data/spec/mongo/cluster/cursor_reaper_spec.rb +36 -21
  162. data/spec/mongo/cluster/periodic_executor_spec.rb +3 -1
  163. data/spec/mongo/cluster_spec.rb +44 -3
  164. data/spec/mongo/collection/view/aggregation_spec.rb +1 -1
  165. data/spec/mongo/collection/view/builder/find_command_spec.rb +4 -0
  166. data/spec/mongo/collection/view/builder/op_query_spec.rb +4 -0
  167. data/spec/mongo/collection/view/map_reduce_spec.rb +1 -1
  168. data/spec/mongo/collection_crud_spec.rb +7 -2
  169. data/spec/mongo/collection_ddl_spec.rb +1 -1
  170. data/spec/mongo/collection_spec.rb +1 -1
  171. data/spec/mongo/cursor/builder/get_more_command_spec.rb +4 -0
  172. data/spec/mongo/cursor/builder/op_get_more_spec.rb +4 -0
  173. data/spec/mongo/cursor_spec.rb +15 -5
  174. data/spec/mongo/database_spec.rb +15 -15
  175. data/spec/mongo/error/operation_failure_heavy_spec.rb +1 -1
  176. data/spec/mongo/grid/fs_bucket_spec.rb +18 -12
  177. data/spec/mongo/grid/stream/write_spec.rb +3 -9
  178. data/spec/mongo/grid/stream_spec.rb +1 -1
  179. data/spec/mongo/index/view_spec.rb +2 -2
  180. data/spec/mongo/operation/delete/op_msg_spec.rb +1 -1
  181. data/spec/mongo/{collection/view → operation/find}/builder/flags_spec.rb +2 -2
  182. data/spec/mongo/{collection/view → operation/find}/builder/modifiers_spec.rb +2 -2
  183. data/spec/mongo/operation/find/legacy_spec.rb +1 -0
  184. data/spec/mongo/operation/insert/bulk_spec.rb +1 -1
  185. data/spec/mongo/operation/insert/op_msg_spec.rb +1 -1
  186. data/spec/mongo/operation/kill_cursors_spec.rb +4 -1
  187. data/spec/mongo/operation/read_preference_legacy_spec.rb +4 -0
  188. data/spec/mongo/operation/read_preference_op_msg_spec.rb +2 -0
  189. data/spec/mongo/operation/update/bulk_spec.rb +1 -1
  190. data/spec/mongo/operation/update/op_msg_spec.rb +1 -1
  191. data/spec/mongo/query_cache_spec.rb +6 -2
  192. data/spec/mongo/server/connection_common_spec.rb +62 -11
  193. data/spec/mongo/server/connection_pool_spec.rb +73 -7
  194. data/spec/mongo/server/connection_spec.rb +138 -43
  195. data/spec/mongo/server/description_spec.rb +1 -1
  196. data/spec/mongo/server/monitor_spec.rb +4 -3
  197. data/spec/mongo/session/session_pool_spec.rb +42 -10
  198. data/spec/mongo/session_transaction_spec.rb +15 -30
  199. data/spec/mongo/socket/unix_spec.rb +1 -0
  200. data/spec/mongo/uri_option_parsing_spec.rb +38 -5
  201. data/spec/runners/change_streams/test.rb +1 -1
  202. data/spec/runners/cmap.rb +1 -1
  203. data/spec/runners/connection_string.rb +7 -3
  204. data/spec/runners/crud/operation.rb +5 -3
  205. data/spec/runners/crud/requirement.rb +1 -0
  206. data/spec/runners/crud.rb +1 -1
  207. data/spec/runners/sdam.rb +2 -1
  208. data/spec/runners/transactions/test.rb +2 -2
  209. data/spec/runners/unified/assertions.rb +2 -3
  210. data/spec/runners/unified/event_subscriber.rb +2 -2
  211. data/spec/runners/unified/test.rb +3 -0
  212. data/spec/runners/unified.rb +1 -1
  213. data/spec/shared/lib/mrss/constraints.rb +11 -5
  214. data/spec/shared/lib/mrss/event_subscriber.rb +200 -0
  215. data/spec/shared/lib/mrss/server_version_registry.rb +17 -12
  216. data/spec/shared/share/Dockerfile.erb +2 -1
  217. data/spec/shared/shlib/server.sh +70 -20
  218. data/spec/spec_tests/change_streams_spec.rb +1 -1
  219. data/spec/spec_tests/cmap_spec.rb +4 -1
  220. data/spec/spec_tests/command_monitoring_spec.rb +2 -2
  221. data/spec/spec_tests/data/command_monitoring/find.yml +9 -9
  222. data/spec/spec_tests/data/crud/read/aggregate-collation.yml +2 -1
  223. data/spec/spec_tests/data/crud/read/aggregate-out.yml +1 -0
  224. data/spec/spec_tests/data/crud/read/count-collation.yml +2 -1
  225. data/spec/spec_tests/data/crud/read/distinct-collation.yml +2 -1
  226. data/spec/spec_tests/data/crud/read/find-collation.yml +2 -1
  227. data/spec/spec_tests/data/crud/write/bulkWrite-collation.yml +2 -1
  228. data/spec/spec_tests/data/crud/write/deleteMany-collation.yml +2 -1
  229. data/spec/spec_tests/data/crud/write/deleteOne-collation.yml +2 -1
  230. data/spec/spec_tests/data/crud/write/findOneAndDelete-collation.yml +3 -2
  231. data/spec/spec_tests/data/crud/write/findOneAndReplace-collation.yml +2 -1
  232. data/spec/spec_tests/data/crud/write/findOneAndUpdate-collation.yml +3 -2
  233. data/spec/spec_tests/data/crud/write/replaceOne-collation.yml +3 -2
  234. data/spec/spec_tests/data/crud/write/updateMany-collation.yml +2 -1
  235. data/spec/spec_tests/data/crud/write/updateOne-collation.yml +2 -1
  236. data/spec/spec_tests/data/load_balancers/event-monitoring.yml +99 -0
  237. data/spec/spec_tests/data/load_balancers/lb-connection-establishment.yml +36 -0
  238. data/spec/spec_tests/data/load_balancers/non-lb-connection-establishment.yml +56 -0
  239. data/spec/spec_tests/data/load_balancers/server-selection.yml +50 -0
  240. data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch-serverErrors.yml +1 -1
  241. data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch.yml +1 -1
  242. data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch-serverErrors.yml +1 -1
  243. data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch.yml +1 -1
  244. data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch-serverErrors.yml +1 -1
  245. data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch.yml +1 -1
  246. data/spec/spec_tests/data/retryable_reads/mapReduce.yml +3 -1
  247. data/spec/spec_tests/data/sdam/load-balanced/discover_load_balancer.yml +25 -0
  248. data/spec/spec_tests/data/sdam_integration/find-network-error.yml +2 -0
  249. data/spec/spec_tests/data/sdam_integration/find-shutdown-error.yml +2 -0
  250. data/spec/spec_tests/data/sdam_integration/hello-command-error.yml +3 -1
  251. data/spec/spec_tests/data/sdam_integration/hello-network-error.yml +3 -1
  252. data/spec/spec_tests/data/sdam_integration/hello-timeout.yml +2 -0
  253. data/spec/spec_tests/data/sdam_integration/insert-network-error.yml +2 -0
  254. data/spec/spec_tests/data/sdam_integration/insert-shutdown-error.yml +2 -0
  255. data/spec/spec_tests/data/sdam_monitoring/load_balancer.yml +65 -0
  256. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-directConnection.yml +13 -0
  257. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-replicaSet-errors.yml +6 -0
  258. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-multiple-hosts.yml +5 -0
  259. data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-txt.yml +10 -0
  260. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/direct-connection-false.yml +0 -0
  261. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/direct-connection-true.yml +0 -0
  262. data/spec/spec_tests/data/seed_list_discovery/replica-set/encoded-userinfo-and-db.yml +15 -0
  263. data/spec/spec_tests/data/seed_list_discovery/replica-set/loadBalanced-false-txt.yml +10 -0
  264. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/longer-parent-in-return.yml +0 -0
  265. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/misformatted-option.yml +0 -0
  266. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/no-results.yml +0 -0
  267. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/not-enough-parts.yml +0 -0
  268. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-result-default-port.yml +0 -0
  269. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-txt-record-multiple-strings.yml +0 -0
  270. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-txt-record.yml +0 -0
  271. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch1.yml +0 -0
  272. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch2.yml +0 -0
  273. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch3.yml +0 -0
  274. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch4.yml +0 -0
  275. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch5.yml +0 -0
  276. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/returned-parent-too-short.yml +0 -0
  277. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/returned-parent-wrong.yml +0 -0
  278. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-results-default-port.yml +0 -0
  279. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-results-nonstandard-port.yml +0 -0
  280. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-txt-records.yml +0 -0
  281. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-not-allowed-option.yml +0 -0
  282. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-overridden-ssl-option.yml +0 -0
  283. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-overridden-uri-option.yml +0 -0
  284. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-unallowed-option.yml +0 -0
  285. data/spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-admin-database.yml +13 -0
  286. data/spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-auth.yml +12 -0
  287. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/uri-with-port.yml +0 -0
  288. data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/uri-with-two-hosts.yml +0 -0
  289. data/spec/spec_tests/data/transactions/retryable-abort-errorLabels.yml +2 -0
  290. data/spec/spec_tests/data/transactions/retryable-abort.yml +2 -0
  291. data/spec/spec_tests/data/transactions/retryable-commit-errorLabels.yml +2 -0
  292. data/spec/spec_tests/data/transactions/retryable-commit.yml +2 -0
  293. data/spec/spec_tests/data/transactions/retryable-writes.yml +2 -0
  294. data/spec/spec_tests/data/uri_options/connection-options.yml +60 -0
  295. data/spec/spec_tests/load_balancers_spec.rb +15 -0
  296. data/spec/spec_tests/retryable_reads_spec.rb +2 -2
  297. data/spec/spec_tests/retryable_writes_spec.rb +1 -1
  298. data/spec/spec_tests/sdam_integration_spec.rb +1 -1
  299. data/spec/spec_tests/sdam_monitoring_spec.rb +10 -5
  300. data/spec/spec_tests/sdam_spec.rb +1 -1
  301. data/spec/spec_tests/seed_list_discovery_spec.rb +118 -0
  302. data/spec/spec_tests/uri_options_spec.rb +4 -4
  303. data/spec/stress/fork_reconnect_stress_spec.rb +1 -5
  304. data/spec/support/certificates/atlas-ocsp-ca.crt +82 -90
  305. data/spec/support/certificates/atlas-ocsp.crt +127 -122
  306. data/spec/support/common_shortcuts.rb +2 -3
  307. data/spec/support/matchers.rb +13 -0
  308. data/spec/support/shared/auth_context.rb +16 -0
  309. data/spec/support/shared/session.rb +2 -2
  310. data/spec/support/spec_config.rb +9 -10
  311. data/spec/support/using_hash.rb +31 -0
  312. data/spec/support/utils.rb +1 -1
  313. data.tar.gz.sig +0 -0
  314. metadata +120 -76
  315. metadata.gz.sig +0 -0
  316. data/lib/mongo/collection/view/builder/find_command.rb +0 -173
  317. data/lib/mongo/collection/view/builder/op_query.rb +0 -94
  318. data/lib/mongo/cursor/builder/get_more_command.rb +0 -80
  319. data/lib/mongo/cursor/builder/kill_cursors_command.rb +0 -111
  320. data/lib/mongo/cursor/builder/op_get_more.rb +0 -64
  321. data/lib/mongo/cursor/builder/op_kill_cursors.rb +0 -106
  322. data/lib/mongo/server/context.rb +0 -72
  323. data/spec/mongo/cursor/builder/op_kill_cursors_spec.rb +0 -66
  324. data/spec/runners/unified/using_hash.rb +0 -34
  325. data/spec/spec_tests/dns_seedlist_discovery_spec.rb +0 -79
  326. data/spec/support/event_subscriber.rb +0 -221
@@ -2,151 +2,156 @@ Certificate:
2
2
  Data:
3
3
  Version: 3 (0x2)
4
4
  Serial Number:
5
- 03:b0:ae:e9:c3:eb:00:48:5d:67:c8:bf:bb:ee:4b:b6:d6:18
5
+ 08:dc:93:55:36:6d:c5:92:20:d0:a3:4c:a1:19:ab:2d
6
6
  Signature Algorithm: sha256WithRSAEncryption
7
- Issuer: C = US, O = Let's Encrypt, CN = R3
7
+ Issuer: C = US, O = DigiCert Inc, CN = DigiCert TLS RSA SHA256 2020 CA1
8
8
  Validity
9
- Not Before: May 5 19:36:15 2021 GMT
10
- Not After : Aug 3 19:36:15 2021 GMT
11
- Subject: CN = *.zbmx1.mongodb.net
9
+ Not Before: Apr 27 00:00:00 2021 GMT
10
+ Not After : May 25 23:59:59 2022 GMT
11
+ Subject: C = US, ST = New York, L = New York, O = "MongoDB, Inc.", CN = *.mongodb-dev.net
12
12
  Subject Public Key Info:
13
13
  Public Key Algorithm: rsaEncryption
14
- RSA Public-Key: (4096 bit)
14
+ RSA Public-Key: (2048 bit)
15
15
  Modulus:
16
- 00:a4:a9:84:57:7b:6f:4c:fe:1f:9e:89:14:90:0e:
17
- 56:92:00:51:59:1d:59:01:8a:69:0b:41:e4:73:8f:
18
- cc:21:ee:52:a0:9c:fe:47:20:be:58:e4:ce:8b:16:
19
- 38:39:48:66:86:fe:6b:2e:d7:11:b0:95:78:4f:11:
20
- c6:6b:2a:f2:9a:37:78:1f:f1:47:39:cc:6e:cb:8c:
21
- b3:7a:ec:8b:7a:af:c5:15:ab:cf:e8:96:3f:63:e9:
22
- bf:58:1f:cb:96:b6:3c:49:c5:06:c3:6e:c2:73:8b:
23
- f1:76:1e:e9:b8:52:e8:5f:fd:e2:22:84:0a:a4:9d:
24
- 09:7a:e3:ab:c5:a5:21:cc:e8:40:25:a1:df:f9:52:
25
- 44:0a:92:cf:7b:72:6d:74:df:83:62:0b:83:6b:cf:
26
- e8:ae:91:ef:22:7b:6d:f3:fa:70:de:9e:cb:83:d9:
27
- 3d:1c:54:84:14:6a:06:5b:4d:f4:95:40:fc:19:93:
28
- 5c:c0:c1:2f:86:16:b0:84:b7:e4:26:93:9b:3a:ab:
29
- 98:c3:cb:fb:ee:dd:f8:26:7f:6c:ae:7a:d2:65:dd:
30
- 68:b3:51:59:bc:c1:3b:23:13:9b:6b:50:e5:87:c5:
31
- 5c:07:7b:cb:c6:b9:17:7c:23:aa:77:49:5e:c1:93:
32
- 5a:7d:fe:af:e3:3c:53:0d:61:7c:b2:e7:c4:7e:8f:
33
- cb:6d:d2:55:23:4b:d0:43:f5:20:51:58:15:c8:0c:
34
- cc:30:48:2d:01:4b:e9:d4:c6:ca:2d:00:74:05:b4:
35
- 8c:3a:6b:3f:db:7a:33:96:17:28:87:56:0d:a1:1c:
36
- 44:60:9a:ae:34:2a:61:ee:e2:42:b3:8b:89:ff:5d:
37
- fa:19:5d:b7:1f:db:0d:44:92:80:83:df:e0:11:88:
38
- 7c:9a:96:f8:7f:5b:cb:6a:ea:44:e6:2c:33:0a:ef:
39
- 32:d7:52:00:b6:30:86:43:d7:60:8b:33:0a:6c:43:
40
- 9c:e9:7b:73:8b:fa:97:9f:23:d4:9a:90:a5:92:25:
41
- 6d:03:b6:0e:33:30:5f:ac:04:0b:4c:cf:ab:82:04:
42
- 56:21:f0:7a:19:55:b5:63:03:35:f9:a0:84:26:73:
43
- cd:4e:9a:c3:34:bc:9e:9c:61:28:6f:fb:1b:b8:a2:
44
- 8e:4a:f8:b5:f2:03:3f:cd:f6:2c:70:bf:4b:f9:0d:
45
- 6a:4c:87:be:58:4d:fa:ba:33:fc:29:e3:29:6e:b3:
46
- df:bb:4d:e7:46:93:d6:aa:40:b2:3f:cf:5d:46:5d:
47
- 8b:17:ef:05:27:23:98:b7:db:59:73:2f:d2:7d:bf:
48
- f2:ff:67:fe:55:05:f2:4f:e7:d0:e4:43:3d:56:03:
49
- 26:25:90:f2:28:4c:21:a1:28:ea:92:b0:a1:b6:9c:
50
- 73:74:9b
16
+ 00:bb:c1:de:f6:08:39:fb:f1:9a:f7:d4:68:6a:d7:
17
+ 81:57:0c:09:b9:8f:39:e5:c8:b1:53:52:d8:64:0c:
18
+ e1:92:9c:ca:3f:92:46:86:5c:e2:8f:20:cf:f9:99:
19
+ d0:95:46:51:7e:55:f7:3d:62:1b:a4:e7:79:31:0c:
20
+ 39:9d:23:bc:00:6f:2f:3d:5f:d4:88:1b:d0:9c:42:
21
+ 26:45:1b:11:b2:d7:45:f5:aa:2f:07:43:da:bc:ab:
22
+ 43:cb:0b:12:59:41:24:c3:bb:86:7f:2d:1a:c9:26:
23
+ d7:6b:25:57:48:9c:88:1a:20:fb:65:01:71:27:0c:
24
+ 24:a7:23:40:dc:b6:69:4d:55:ef:14:ba:bd:05:b6:
25
+ cf:5e:b0:c2:f6:56:bc:88:e9:81:04:94:80:9b:cf:
26
+ ee:f3:15:05:79:61:41:21:4a:a1:23:29:66:90:e9:
27
+ d7:03:1e:4f:30:bd:81:46:e4:9b:ab:1f:f8:02:5c:
28
+ 58:98:48:c5:50:16:16:80:0d:25:be:53:27:aa:8b:
29
+ ca:6c:d5:d9:89:50:2b:38:a6:55:fe:c3:0a:6a:db:
30
+ 9c:1e:23:a2:84:93:4f:d1:a1:3d:00:48:ab:c1:2a:
31
+ 3c:0a:59:a8:5b:d4:88:32:54:a9:de:88:de:1a:82:
32
+ ef:61:fa:90:fa:42:3d:1d:a8:98:d6:3b:a5:d4:eb:
33
+ c6:cf
51
34
  Exponent: 65537 (0x10001)
52
35
  X509v3 extensions:
36
+ X509v3 Authority Key Identifier:
37
+ keyid:B7:6B:A2:EA:A8:AA:84:8C:79:EA:B4:DA:0F:98:B2:C5:95:76:B9:F4
38
+
39
+ X509v3 Subject Key Identifier:
40
+ 3D:23:31:1E:EA:1C:8D:8A:09:AA:2D:2A:84:BF:06:31:DE:87:04:01
41
+ X509v3 Subject Alternative Name:
42
+ DNS:*.mongodb-dev.net, DNS:mongodb-dev.net
53
43
  X509v3 Key Usage: critical
54
44
  Digital Signature, Key Encipherment
55
45
  X509v3 Extended Key Usage:
56
46
  TLS Web Server Authentication, TLS Web Client Authentication
57
- X509v3 Basic Constraints: critical
58
- CA:FALSE
59
- X509v3 Subject Key Identifier:
60
- 51:08:03:39:2B:B7:41:3E:23:62:B9:88:A6:63:57:F8:44:FA:F2:4E
61
- X509v3 Authority Key Identifier:
62
- keyid:14:2E:B3:17:B7:58:56:CB:AE:50:09:40:E6:1F:AF:9D:8B:14:C2:C6
47
+ X509v3 CRL Distribution Points:
63
48
 
64
- Authority Information Access:
65
- OCSP - URI:http://r3.o.lencr.org
66
- CA Issuers - URI:http://r3.i.lencr.org/
49
+ Full Name:
50
+ URI:http://crl3.digicert.com/DigiCertTLSRSASHA2562020CA1.crl
51
+
52
+ Full Name:
53
+ URI:http://crl4.digicert.com/DigiCertTLSRSASHA2562020CA1.crl
67
54
 
68
- X509v3 Subject Alternative Name:
69
- DNS:*.e10cb93a9cec74689d88fe1d.zbmx1.mongodb.net, DNS:*.zbmx1.mesh.mongodb.net, DNS:*.zbmx1.mongodb.net
70
55
  X509v3 Certificate Policies:
71
- Policy: 2.23.140.1.2.1
72
- Policy: 1.3.6.1.4.1.44947.1.1.1
73
- CPS: http://cps.letsencrypt.org
56
+ Policy: 2.23.140.1.2.2
57
+ CPS: http://www.digicert.com/CPS
58
+
59
+ Authority Information Access:
60
+ OCSP - URI:http://ocsp.digicert.com
61
+ CA Issuers - URI:http://cacerts.digicert.com/DigiCertTLSRSASHA2562020CA1.crt
74
62
 
63
+ X509v3 Basic Constraints: critical
64
+ CA:FALSE
75
65
  CT Precertificate SCTs:
76
66
  Signed Certificate Timestamp:
77
67
  Version : v1 (0x0)
78
- Log ID : 94:20:BC:1E:8E:D5:8D:6C:88:73:1F:82:8B:22:2C:0D:
79
- D1:DA:4D:5E:6C:4F:94:3D:61:DB:4E:2F:58:4D:A2:C2
80
- Timestamp : May 5 20:36:15.187 2021 GMT
68
+ Log ID : 29:79:BE:F0:9E:39:39:21:F0:56:73:9F:63:A5:77:E5:
69
+ BE:57:7D:9C:60:0A:F8:F9:4D:5D:26:5C:25:5D:C7:84
70
+ Timestamp : Apr 27 23:28:05.994 2021 GMT
81
71
  Extensions: none
82
72
  Signature : ecdsa-with-SHA256
83
- 30:46:02:21:00:E9:D3:00:E2:90:87:44:5A:D7:10:53:
84
- 65:F4:E0:E3:3C:D3:C7:75:69:B3:BE:53:F3:00:24:58:
85
- C2:9D:37:D6:81:02:21:00:B9:4F:54:00:FF:76:90:EB:
86
- 69:7C:F4:D7:23:5A:29:26:F0:26:2E:3B:D2:72:1D:82:
87
- 21:EF:93:01:E3:08:BB:30
73
+ 30:45:02:20:42:20:09:2C:F8:4F:9C:4D:70:0C:1D:A6:
74
+ 39:A1:EC:20:4B:54:4B:50:5E:B5:B9:71:1F:6B:60:BC:
75
+ 65:5B:E7:0F:02:21:00:BA:DE:65:82:26:65:7C:D7:01:
76
+ 7C:36:51:71:CF:F7:2C:09:7B:C7:9A:1F:E4:6D:8E:11:
77
+ 7E:DB:60:52:BC:82:8B
88
78
  Signed Certificate Timestamp:
89
79
  Version : v1 (0x0)
90
- Log ID : 7D:3E:F2:F8:8F:FF:88:55:68:24:C2:C0:CA:9E:52:89:
91
- 79:2B:C5:0E:78:09:7F:2E:6A:97:68:99:7E:22:F0:D7
92
- Timestamp : May 5 20:36:15.245 2021 GMT
80
+ Log ID : 22:45:45:07:59:55:24:56:96:3F:A1:2F:F1:F7:6D:86:
81
+ E0:23:26:63:AD:C0:4B:7F:5D:C6:83:5C:6E:E2:0F:02
82
+ Timestamp : Apr 27 23:28:05.942 2021 GMT
93
83
  Extensions: none
94
84
  Signature : ecdsa-with-SHA256
95
- 30:45:02:20:3D:A9:45:35:70:71:18:45:B8:15:53:60:
96
- 42:1D:6E:50:F4:DC:68:A2:D0:45:03:66:3A:8E:B7:58:
97
- FC:AD:E2:45:02:21:00:FA:79:91:BF:4F:FA:45:76:90:
98
- D5:61:D8:33:97:71:AA:16:4C:0E:A2:19:14:9F:69:FE:
99
- B8:00:A1:23:22:86:01
85
+ 30:44:02:20:0C:6B:5C:7F:31:B5:24:10:73:23:AF:27:
86
+ 20:11:58:9E:40:A6:6A:BB:D8:48:0F:D1:4A:F1:F8:A9:
87
+ B0:30:1E:34:02:20:13:04:B5:82:28:59:D7:0B:86:7F:
88
+ C6:22:6E:9C:67:FF:F1:A3:9F:BF:54:AB:0D:B8:1A:8E:
89
+ 16:D2:F1:8E:37:FF
90
+ Signed Certificate Timestamp:
91
+ Version : v1 (0x0)
92
+ Log ID : 51:A3:B0:F5:FD:01:79:9C:56:6D:B8:37:78:8F:0C:A4:
93
+ 7A:CC:1B:27:CB:F7:9E:88:42:9A:0D:FE:D4:8B:05:E5
94
+ Timestamp : Apr 27 23:28:06.392 2021 GMT
95
+ Extensions: none
96
+ Signature : ecdsa-with-SHA256
97
+ 30:46:02:21:00:D0:FE:FE:CA:E2:72:85:3A:A6:13:D0:
98
+ ED:55:8B:67:AF:86:F4:D7:BE:66:67:BB:99:BF:7C:10:
99
+ 2D:28:0E:49:C3:02:21:00:BF:FF:BA:B8:4D:D1:B7:6A:
100
+ 6B:E9:B3:E5:A6:93:CA:14:37:70:C1:4F:89:89:66:58:
101
+ 3F:AA:22:B0:1E:F9:14:DF
100
102
  Signature Algorithm: sha256WithRSAEncryption
101
- 86:c9:91:34:56:55:a8:d6:f3:09:de:f1:a4:da:a7:71:19:95:
102
- a0:3f:49:47:22:f0:fb:09:27:29:30:54:98:12:ff:01:33:e3:
103
- 3d:72:e0:41:56:8c:51:70:b8:d0:26:b5:80:b4:f7:35:e1:e0:
104
- 6e:92:9b:74:ed:89:7e:fd:99:fc:0c:9d:4e:79:7b:e7:21:6e:
105
- 89:e9:f8:18:4f:c2:9a:ac:5b:04:8e:94:a3:95:2d:80:53:89:
106
- 8f:62:34:cb:e3:55:59:57:57:8f:a2:8e:7d:08:bb:17:46:15:
107
- cd:8c:03:47:5b:b5:b1:13:6e:c7:19:7e:e7:bf:9d:b8:b3:23:
108
- 03:b3:62:69:2b:f3:92:f1:ae:a7:ec:70:48:22:bb:9a:09:df:
109
- 6a:7b:1d:3f:85:51:bd:ef:ae:2b:9f:e6:4f:c8:bd:10:1e:45:
110
- ea:f0:72:7c:6b:e1:54:ff:80:d2:90:59:8a:66:ef:43:8a:ef:
111
- ea:2e:32:6b:32:01:b0:14:29:58:7f:4c:69:aa:b9:d9:14:a0:
112
- 9d:bb:7b:6a:2d:ff:2a:3d:24:b4:be:8c:c2:59:fa:1d:8f:26:
113
- ee:ff:c5:5c:db:2c:38:d1:8a:5e:c0:9d:66:8e:be:7e:60:a7:
114
- a3:3a:e5:e5:9f:83:ff:57:ca:5a:7f:f9:56:d5:a7:24:5a:56:
115
- d9:bc:54:72
103
+ 78:e3:4f:d2:0f:56:13:0d:a3:5d:1a:68:d7:64:f5:60:d2:37:
104
+ 7e:94:d7:4d:d3:5f:11:27:e8:0b:2c:74:6f:23:08:24:94:ba:
105
+ fc:b8:8a:33:3f:99:18:83:cd:4f:14:3a:82:f9:ba:f3:ff:2c:
106
+ b1:f5:c9:be:af:fd:16:79:bd:cf:39:ba:5c:47:88:b1:b1:23:
107
+ 6b:6d:1c:67:5d:98:52:58:1d:72:ee:7e:c5:4b:e4:03:ca:ba:
108
+ 47:bf:89:c5:48:c2:b1:0b:9c:3e:ed:3e:04:19:62:66:4c:c6:
109
+ 44:6f:db:33:20:14:b1:df:c1:8f:3a:21:c1:59:0e:f8:70:3c:
110
+ fe:e0:ad:77:7b:5d:8c:de:a3:cd:d0:5c:84:36:10:00:42:28:
111
+ ee:7c:32:28:4d:41:94:3c:e4:36:7e:e5:d2:b3:d9:6f:f3:f5:
112
+ 63:24:3f:9f:c6:64:cc:32:23:7e:fd:00:f4:c3:89:ac:5f:28:
113
+ f2:a3:af:a9:21:47:b1:f4:48:7c:79:6d:e7:6e:b8:35:15:ea:
114
+ 6d:f2:13:35:8f:56:ea:e6:47:fb:a9:b4:f6:64:ee:b9:e8:07:
115
+ 73:de:ef:20:c0:36:a9:10:bf:4a:df:29:90:fb:fc:05:85:f0:
116
+ 62:94:7e:74:3a:42:cb:01:3d:ef:65:82:48:b8:87:8e:0e:17:
117
+ cb:6c:a0:dc
118
+
116
119
  -----BEGIN CERTIFICATE-----
117
- MIIGdTCCBV2gAwIBAgISA7Cu6cPrAEhdZ8i/u+5LttYYMA0GCSqGSIb3DQEBCwUA
118
- MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD
119
- EwJSMzAeFw0yMTA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AiEAv/+6uE3Rt2pr6bPlppPK
150
+ FDdwwU+JiWZYP6oisB75FN8wDQYJKoZIhvcNAQELBQADggEBAHjjT9IPVhMNo10a
151
+ aNdk9WDSN36U103TXxEn6AssdG8jCCSUuvy4ijM/mRiDzU8UOoL5uvP/LLH1yb6v
152
+ /RZ5vc85ulxHiLGxI2ttHGddmFJYHXLufsVL5APKuke/icVIwrELnD7tPgQZYmZM
153
+ xkRv2zMgFLHfwY86IcFZDvhwPP7grXd7XYzeo83QXIQ2EABCKO58MihNQZQ85DZ+
154
+ 5dKz2W/z9WMkP5/GZMwyI379APTDiaxfKPKjr6khR7H0SHx5beduuDUV6m3yEzWP
155
+ VurmR/uptPZk7rnoB3Pe7yDANqkQv0rfKZD7/AWF8GKUfnQ6QssBPe9lgki4h44O
156
+ F8tsoNw=
157
+ -----END CERTIFICATE-----
@@ -246,9 +246,8 @@ module CommonShortcuts
246
246
  # must be closed in the scope of the example.
247
247
  register_server(server)
248
248
  description = Mongo::Server::Description.new(
249
- address,
250
- config,
251
- average_round_trip_time,
249
+ address, config,
250
+ average_round_trip_time: average_round_trip_time,
252
251
  )
253
252
  server.tap do |s|
254
253
  allow(s).to receive(:description).and_return(description)
@@ -73,3 +73,16 @@ RSpec::Matchers.define :take_shorter_than do |min_expected_time|
73
73
  (Time.now - start_time).should < min_expected_time
74
74
  end
75
75
  end
76
+
77
+ RSpec::Matchers.define :be_explain_output do
78
+ match do |actual|
79
+ Hash === actual && (
80
+ actual.key?('queryPlanner') ||
81
+ actual.key?('allPlans')
82
+ )
83
+ end
84
+
85
+ failure_message do |actual|
86
+ "expected that #{actual} is explain output: is a hash with either allPlans or queryPlanner keys present"
87
+ end
88
+ end
@@ -0,0 +1,16 @@
1
+ shared_context 'auth unit tests' do
2
+ let(:generation_manager) do
3
+ Mongo::Server::ConnectionPool::GenerationManager.new(server: server)
4
+ end
5
+
6
+ let(:pool) do
7
+ double('pool').tap do |pool|
8
+ allow(pool).to receive(:generation_manager).and_return(generation_manager)
9
+ end
10
+ end
11
+
12
+ let(:connection) do
13
+ Mongo::Server::Connection.new(server, SpecConfig.instance.monitoring_options.merge(
14
+ connection_pool: pool))
15
+ end
16
+ end
@@ -185,7 +185,7 @@ end
185
185
 
186
186
  shared_examples 'an operation supporting causally consistent reads' do
187
187
 
188
- let(:subscriber) { EventSubscriber.new }
188
+ let(:subscriber) { Mrss::EventSubscriber.new }
189
189
 
190
190
  let(:client) do
191
191
  authorized_client.tap do |client|
@@ -622,7 +622,7 @@ shared_examples 'an operation updating cluster time' do
622
622
  client.start_session
623
623
  end
624
624
 
625
- let(:subscriber) { EventSubscriber.new }
625
+ let(:subscriber) { Mrss::EventSubscriber.new }
626
626
 
627
627
  let(:client) do
628
628
  authorized_client.tap do |client|
@@ -15,7 +15,10 @@ class SpecConfig
15
15
  if ENV['MONGODB_URI']
16
16
  @mongodb_uri = Mongo::URI.new(ENV['MONGODB_URI'])
17
17
  @uri_options = Mongo::Options::Mapper.transform_keys_to_symbols(@mongodb_uri.uri_options)
18
- if @uri_options[:replica_set]
18
+ if ENV['TOPOLOGY'] == 'load-balanced'
19
+ @addresses = @mongodb_uri.servers
20
+ @connect_options = { connect: :load_balanced }
21
+ elsif @uri_options[:replica_set]
19
22
  @addresses = @mongodb_uri.servers
20
23
  @connect_options = { connect: :replica_set, replica_set: @uri_options[:replica_set] }
21
24
  elsif @uri_options[:connect] == :sharded || ENV['TOPOLOGY'] == 'sharded-cluster'
@@ -30,15 +33,6 @@ class SpecConfig
30
33
  else
31
34
  @ssl = @uri_options[:ssl]
32
35
  end
33
- elsif ENV['MONGODB_ADDRESSES']
34
- @addresses = ENV['MONGODB_ADDRESSES'] ? ENV['MONGODB_ADDRESSES'].split(',').freeze : [ '127.0.0.1:27017' ].freeze
35
- if ENV['RS_ENABLED']
36
- @connect_options = { connect: :replica_set, replica_set: ENV['RS_NAME'] }
37
- elsif ENV['SHARDED_ENABLED']
38
- @connect_options = { connect: :sharded }
39
- else
40
- @connect_options = { connect: :direct }
41
- end
42
36
  end
43
37
 
44
38
  @uri_tls_options = {}
@@ -634,4 +628,9 @@ EOT
634
628
  creds
635
629
  end
636
630
  end
631
+
632
+ # Returns whether the test suite was configured with a single mongos.
633
+ def single_mongos?
634
+ %w(1 true yes).include?(ENV['SINGLE_MONGOS'])
635
+ end
637
636
  end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+ # encoding: utf-8
3
+
4
+ class UsingHash < Hash
5
+ def use(key)
6
+ wrap(self[key]).tap do
7
+ delete(key)
8
+ end
9
+ end
10
+
11
+ def use!(key)
12
+ wrap(fetch(key)).tap do
13
+ delete(key)
14
+ end
15
+ end
16
+
17
+ private
18
+
19
+ def wrap(v)
20
+ case v
21
+ when Hash
22
+ self.class[v]
23
+ when Array
24
+ v.map do |subv|
25
+ wrap(subv)
26
+ end
27
+ else
28
+ v
29
+ end
30
+ end
31
+ end
@@ -556,7 +556,7 @@ module Utils
556
556
  # command event published, asserts the command event published has the
557
557
  # specified command name, and returns the published event.
558
558
  module_function def get_command_event(client, command_name, include_auth: false)
559
- subscriber = EventSubscriber.new
559
+ subscriber = Mrss::EventSubscriber.new
560
560
  client.subscribe(Mongo::Monitoring::COMMAND, subscriber)
561
561
  begin
562
562
  yield client
data.tar.gz.sig CHANGED
Binary file