mongo 2.15.0 → 2.16.1
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.md +1 -1
- data/lib/mongo/bulk_write.rb +2 -2
- data/lib/mongo/client.rb +45 -5
- data/lib/mongo/cluster/periodic_executor.rb +4 -3
- data/lib/mongo/cluster/reapers/cursor_reaper.rb +76 -43
- data/lib/mongo/cluster/sdam_flow.rb +9 -3
- data/lib/mongo/cluster/topology/base.rb +13 -9
- data/lib/mongo/cluster/topology/load_balanced.rb +102 -0
- data/lib/mongo/cluster/topology.rb +28 -8
- data/lib/mongo/cluster.rb +136 -51
- data/lib/mongo/collection/view/aggregation.rb +5 -10
- data/lib/mongo/collection/view/builder/aggregation.rb +6 -5
- data/lib/mongo/collection/view/builder/map_reduce.rb +12 -49
- data/lib/mongo/collection/view/builder.rb +0 -4
- data/lib/mongo/collection/view/iterable.rb +58 -24
- data/lib/mongo/collection/view/map_reduce.rb +39 -15
- data/lib/mongo/collection/view/readable.rb +60 -51
- data/lib/mongo/collection/view/writable.rb +178 -175
- data/lib/mongo/collection/view.rb +15 -21
- data/lib/mongo/collection.rb +13 -13
- data/lib/mongo/cursor/kill_spec.rb +38 -0
- data/lib/mongo/cursor.rb +72 -31
- data/lib/mongo/database/view.rb +1 -1
- data/lib/mongo/error/bad_load_balancer_target.rb +26 -0
- data/lib/mongo/error/missing_service_id.rb +26 -0
- data/lib/mongo/error/no_service_connection_available.rb +49 -0
- data/lib/mongo/error/notable.rb +7 -0
- data/lib/mongo/error.rb +3 -0
- data/lib/mongo/grid/fs_bucket.rb +21 -2
- data/lib/mongo/id.rb +7 -5
- data/lib/mongo/index/view.rb +22 -41
- data/lib/mongo/monitoring/event/cmap/pool_cleared.rb +7 -4
- data/lib/mongo/monitoring/event/command_failed.rb +1 -1
- data/lib/mongo/monitoring/event/command_started.rb +2 -0
- data/lib/mongo/monitoring/publishable.rb +2 -2
- data/lib/mongo/operation/aggregate/command.rb +8 -0
- data/lib/mongo/operation/context.rb +19 -1
- data/lib/mongo/operation/count/command.rb +6 -0
- data/lib/mongo/operation/count/op_msg.rb +6 -0
- data/lib/mongo/operation/create/command.rb +7 -1
- data/lib/mongo/operation/create/op_msg.rb +7 -0
- data/lib/mongo/operation/create_index/command.rb +17 -1
- data/lib/mongo/operation/create_index/op_msg.rb +17 -4
- data/lib/mongo/operation/delete/command.rb +6 -3
- data/lib/mongo/operation/delete/legacy.rb +9 -2
- data/lib/mongo/operation/delete/op_msg.rb +8 -1
- data/lib/mongo/operation/distinct/command.rb +6 -0
- data/lib/mongo/operation/distinct/op_msg.rb +7 -0
- data/lib/mongo/operation/explain/command.rb +13 -1
- data/lib/mongo/operation/explain/legacy.rb +12 -5
- data/lib/mongo/operation/explain/op_msg.rb +9 -1
- data/lib/mongo/operation/find/builder/command.rb +110 -0
- data/lib/mongo/{collection/view → operation/find}/builder/flags.rb +10 -14
- data/lib/mongo/operation/find/builder/legacy.rb +123 -0
- data/lib/mongo/{collection/view → operation/find}/builder/modifiers.rb +31 -25
- data/lib/mongo/{cursor → operation/find}/builder.rb +4 -4
- data/lib/mongo/operation/find/command.rb +9 -0
- data/lib/mongo/operation/find/legacy.rb +10 -1
- data/lib/mongo/operation/find/op_msg.rb +12 -0
- data/lib/mongo/operation/find.rb +1 -0
- data/lib/mongo/operation/get_more/command.rb +1 -0
- data/lib/mongo/operation/get_more/command_builder.rb +38 -0
- data/lib/mongo/operation/get_more/op_msg.rb +1 -0
- data/lib/mongo/operation/get_more.rb +1 -0
- data/lib/mongo/operation/kill_cursors/command.rb +8 -0
- data/lib/mongo/operation/kill_cursors/command_builder.rb +35 -0
- data/lib/mongo/operation/kill_cursors/legacy.rb +2 -1
- data/lib/mongo/operation/kill_cursors/op_msg.rb +10 -0
- data/lib/mongo/operation/kill_cursors.rb +1 -0
- data/lib/mongo/operation/map_reduce/command.rb +8 -0
- data/lib/mongo/operation/map_reduce/op_msg.rb +1 -1
- data/lib/mongo/operation/shared/executable.rb +15 -1
- data/lib/mongo/operation/shared/polymorphic_operation.rb +1 -1
- data/lib/mongo/operation/shared/read_preference_supported.rb +3 -1
- data/lib/mongo/operation/shared/response_handling.rb +1 -0
- data/lib/mongo/operation/shared/sessions_supported.rb +12 -12
- data/lib/mongo/operation/shared/specifiable.rb +11 -29
- data/lib/mongo/operation/shared/validatable.rb +87 -0
- data/lib/mongo/operation/shared/write.rb +1 -1
- data/lib/mongo/operation/update/command.rb +6 -3
- data/lib/mongo/operation/update/legacy.rb +19 -11
- data/lib/mongo/operation/update/op_msg.rb +7 -4
- data/lib/mongo/operation/write_command/command.rb +51 -0
- data/lib/mongo/operation/write_command/op_msg.rb +43 -0
- data/lib/mongo/operation/write_command.rb +32 -0
- data/lib/mongo/operation.rb +10 -0
- data/lib/mongo/protocol/query.rb +35 -18
- data/lib/mongo/server/connection.rb +25 -3
- data/lib/mongo/server/connection_base.rb +12 -1
- data/lib/mongo/server/connection_common.rb +38 -1
- data/lib/mongo/server/connection_pool/generation_manager.rb +71 -0
- data/lib/mongo/server/connection_pool.rb +100 -27
- data/lib/mongo/server/description/features.rb +17 -16
- data/lib/mongo/server/description/load_balancer.rb +33 -0
- data/lib/mongo/server/description.rb +85 -6
- data/lib/mongo/server/monitor/connection.rb +5 -6
- data/lib/mongo/server/monitor.rb +2 -1
- data/lib/mongo/server/pending_connection.rb +47 -31
- data/lib/mongo/server/push_monitor.rb +10 -1
- data/lib/mongo/server.rb +73 -26
- data/lib/mongo/server_selector/base.rb +5 -1
- data/lib/mongo/session/session_pool.rb +11 -0
- data/lib/mongo/session.rb +21 -1
- data/lib/mongo/socket/ocsp_verifier.rb +6 -37
- data/lib/mongo/uri/options_mapper.rb +1 -0
- data/lib/mongo/uri/srv_protocol.rb +6 -8
- data/lib/mongo/uri.rb +18 -0
- data/lib/mongo/utils.rb +0 -7
- data/lib/mongo/version.rb +1 -1
- data/mongo.gemspec +1 -1
- data/spec/integration/auth_spec.rb +31 -1
- data/spec/integration/awaited_ismaster_spec.rb +1 -1
- data/spec/integration/bulk_write_spec.rb +1 -1
- data/spec/integration/change_stream_spec.rb +3 -3
- data/spec/integration/client_construction_spec.rb +54 -0
- data/spec/integration/client_side_encryption/auto_encryption_bulk_writes_spec.rb +1 -1
- data/spec/integration/client_side_encryption/auto_encryption_command_monitoring_spec.rb +1 -1
- data/spec/integration/client_side_encryption/bson_size_limit_spec.rb +1 -1
- data/spec/integration/client_side_encryption/data_key_spec.rb +1 -1
- data/spec/integration/client_spec.rb +2 -0
- data/spec/integration/command_monitoring_spec.rb +1 -1
- data/spec/integration/command_spec.rb +1 -1
- data/spec/integration/connection_spec.rb +52 -35
- data/spec/integration/crud_spec.rb +174 -1
- data/spec/integration/cursor_pinning_spec.rb +121 -0
- data/spec/integration/cursor_reaping_spec.rb +8 -4
- data/spec/integration/fork_reconnect_spec.rb +1 -5
- data/spec/integration/get_more_spec.rb +1 -1
- data/spec/integration/heartbeat_events_spec.rb +1 -1
- data/spec/integration/map_reduce_spec.rb +77 -0
- data/spec/integration/query_cache_spec.rb +47 -2
- data/spec/integration/query_cache_transactions_spec.rb +1 -1
- data/spec/integration/read_concern_spec.rb +1 -1
- data/spec/integration/read_preference_spec.rb +1 -1
- data/spec/integration/reconnect_spec.rb +30 -12
- data/spec/integration/retryable_errors_spec.rb +1 -1
- data/spec/integration/retryable_writes/retryable_writes_36_and_older_spec.rb +1 -1
- data/spec/integration/retryable_writes/retryable_writes_40_and_newer_spec.rb +1 -1
- data/spec/integration/sdam_error_handling_spec.rb +5 -3
- data/spec/integration/sdam_events_spec.rb +35 -19
- data/spec/integration/sdam_prose_spec.rb +1 -1
- data/spec/integration/server_monitor_spec.rb +1 -0
- data/spec/integration/server_selector_spec.rb +22 -5
- data/spec/integration/server_spec.rb +2 -0
- data/spec/integration/srv_monitoring_spec.rb +1 -1
- data/spec/integration/step_down_spec.rb +1 -1
- data/spec/integration/transaction_pinning_spec.rb +120 -0
- data/spec/integration/versioned_api_examples_spec.rb +45 -0
- data/spec/integration/x509_auth_spec.rb +1 -1
- data/spec/lite_spec_helper.rb +1 -2
- data/spec/mongo/address/unix_spec.rb +1 -0
- data/spec/mongo/auth/cr_spec.rb +2 -3
- data/spec/mongo/auth/ldap_spec.rb +2 -3
- data/spec/mongo/auth/scram_spec.rb +2 -3
- data/spec/mongo/auth/user/view_spec.rb +1 -1
- data/spec/mongo/auth/x509_spec.rb +2 -3
- data/spec/mongo/bulk_write_spec.rb +3 -3
- data/spec/mongo/client_construction_spec.rb +259 -28
- data/spec/mongo/client_spec.rb +6 -4
- data/spec/mongo/cluster/cursor_reaper_spec.rb +36 -21
- data/spec/mongo/cluster/periodic_executor_spec.rb +3 -1
- data/spec/mongo/cluster_spec.rb +44 -3
- data/spec/mongo/collection/view/aggregation_spec.rb +1 -1
- data/spec/mongo/collection/view/builder/find_command_spec.rb +4 -0
- data/spec/mongo/collection/view/builder/op_query_spec.rb +4 -0
- data/spec/mongo/collection/view/map_reduce_spec.rb +1 -1
- data/spec/mongo/collection_crud_spec.rb +7 -2
- data/spec/mongo/collection_ddl_spec.rb +1 -1
- data/spec/mongo/collection_spec.rb +1 -1
- data/spec/mongo/cursor/builder/get_more_command_spec.rb +4 -0
- data/spec/mongo/cursor/builder/op_get_more_spec.rb +4 -0
- data/spec/mongo/cursor_spec.rb +15 -5
- data/spec/mongo/database_spec.rb +15 -15
- data/spec/mongo/error/operation_failure_heavy_spec.rb +1 -1
- data/spec/mongo/grid/fs_bucket_spec.rb +18 -12
- data/spec/mongo/grid/stream/write_spec.rb +3 -9
- data/spec/mongo/grid/stream_spec.rb +1 -1
- data/spec/mongo/index/view_spec.rb +2 -2
- data/spec/mongo/operation/delete/op_msg_spec.rb +1 -1
- data/spec/mongo/{collection/view → operation/find}/builder/flags_spec.rb +2 -2
- data/spec/mongo/{collection/view → operation/find}/builder/modifiers_spec.rb +2 -2
- data/spec/mongo/operation/find/legacy_spec.rb +1 -0
- data/spec/mongo/operation/insert/bulk_spec.rb +1 -1
- data/spec/mongo/operation/insert/op_msg_spec.rb +1 -1
- data/spec/mongo/operation/kill_cursors_spec.rb +4 -1
- data/spec/mongo/operation/read_preference_legacy_spec.rb +4 -0
- data/spec/mongo/operation/read_preference_op_msg_spec.rb +2 -0
- data/spec/mongo/operation/update/bulk_spec.rb +1 -1
- data/spec/mongo/operation/update/op_msg_spec.rb +1 -1
- data/spec/mongo/query_cache_spec.rb +6 -2
- data/spec/mongo/server/connection_common_spec.rb +62 -11
- data/spec/mongo/server/connection_pool_spec.rb +73 -7
- data/spec/mongo/server/connection_spec.rb +138 -43
- data/spec/mongo/server/description_spec.rb +1 -1
- data/spec/mongo/server/monitor/connection_spec.rb +22 -0
- data/spec/mongo/server/monitor_spec.rb +4 -3
- data/spec/mongo/server/push_monitor_spec.rb +101 -0
- data/spec/mongo/session/session_pool_spec.rb +42 -10
- data/spec/mongo/session_transaction_spec.rb +15 -30
- data/spec/mongo/socket/unix_spec.rb +1 -0
- data/spec/mongo/uri_option_parsing_spec.rb +38 -5
- data/spec/runners/change_streams/test.rb +1 -1
- data/spec/runners/cmap.rb +1 -1
- data/spec/runners/connection_string.rb +7 -3
- data/spec/runners/crud/operation.rb +5 -3
- data/spec/runners/crud/requirement.rb +1 -0
- data/spec/runners/crud.rb +1 -1
- data/spec/runners/sdam.rb +2 -1
- data/spec/runners/transactions/test.rb +2 -2
- data/spec/runners/unified/assertions.rb +2 -3
- data/spec/runners/unified/event_subscriber.rb +2 -2
- data/spec/runners/unified/support_operations.rb +10 -2
- data/spec/runners/unified/test.rb +3 -0
- data/spec/runners/unified.rb +1 -1
- data/spec/shared/lib/mrss/cluster_config.rb +6 -1
- data/spec/shared/lib/mrss/constraints.rb +11 -5
- data/spec/shared/lib/mrss/event_subscriber.rb +200 -0
- data/spec/shared/lib/mrss/server_version_registry.rb +17 -12
- data/spec/shared/share/Dockerfile.erb +5 -4
- data/spec/shared/shlib/server.sh +70 -20
- data/spec/spec_tests/change_streams_spec.rb +1 -1
- data/spec/spec_tests/cmap_spec.rb +4 -1
- data/spec/spec_tests/command_monitoring_spec.rb +2 -2
- data/spec/spec_tests/data/command_monitoring/find.yml +9 -9
- data/spec/spec_tests/data/crud/read/aggregate-collation.yml +2 -1
- data/spec/spec_tests/data/crud/read/aggregate-out.yml +1 -0
- data/spec/spec_tests/data/crud/read/count-collation.yml +2 -1
- data/spec/spec_tests/data/crud/read/distinct-collation.yml +2 -1
- data/spec/spec_tests/data/crud/read/find-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/bulkWrite-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/deleteMany-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/deleteOne-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/findOneAndDelete-collation.yml +3 -2
- data/spec/spec_tests/data/crud/write/findOneAndReplace-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/findOneAndUpdate-collation.yml +3 -2
- data/spec/spec_tests/data/crud/write/replaceOne-collation.yml +3 -2
- data/spec/spec_tests/data/crud/write/updateMany-collation.yml +2 -1
- data/spec/spec_tests/data/crud/write/updateOne-collation.yml +2 -1
- data/spec/spec_tests/data/load_balancers/event-monitoring.yml +99 -0
- data/spec/spec_tests/data/load_balancers/lb-connection-establishment.yml +36 -0
- data/spec/spec_tests/data/load_balancers/non-lb-connection-establishment.yml +56 -0
- data/spec/spec_tests/data/load_balancers/server-selection.yml +50 -0
- data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch-serverErrors.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-client.watch.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch-serverErrors.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.coll.watch.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch-serverErrors.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/changeStreams-db.watch.yml +1 -1
- data/spec/spec_tests/data/retryable_reads/mapReduce.yml +3 -1
- data/spec/spec_tests/data/sdam/load-balanced/discover_load_balancer.yml +25 -0
- data/spec/spec_tests/data/sdam_integration/find-network-error.yml +2 -0
- data/spec/spec_tests/data/sdam_integration/find-shutdown-error.yml +2 -0
- data/spec/spec_tests/data/sdam_integration/hello-command-error.yml +3 -1
- data/spec/spec_tests/data/sdam_integration/hello-network-error.yml +3 -1
- data/spec/spec_tests/data/sdam_integration/hello-timeout.yml +2 -0
- data/spec/spec_tests/data/sdam_integration/insert-network-error.yml +2 -0
- data/spec/spec_tests/data/sdam_integration/insert-shutdown-error.yml +2 -0
- data/spec/spec_tests/data/sdam_monitoring/load_balancer.yml +65 -0
- data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-directConnection.yml +13 -0
- data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-replicaSet-errors.yml +6 -0
- data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-multiple-hosts.yml +5 -0
- data/spec/spec_tests/data/seed_list_discovery/load-balanced/loadBalanced-true-txt.yml +10 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/direct-connection-false.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/direct-connection-true.yml +0 -0
- data/spec/spec_tests/data/seed_list_discovery/replica-set/encoded-userinfo-and-db.yml +15 -0
- data/spec/spec_tests/data/seed_list_discovery/replica-set/loadBalanced-false-txt.yml +10 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/longer-parent-in-return.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/misformatted-option.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/no-results.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/not-enough-parts.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-result-default-port.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-txt-record-multiple-strings.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/one-txt-record.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch1.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch2.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch3.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch4.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/parent-part-mismatch5.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/returned-parent-too-short.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/returned-parent-wrong.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-results-default-port.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-results-nonstandard-port.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/two-txt-records.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-not-allowed-option.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-overridden-ssl-option.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-overridden-uri-option.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/txt-record-with-unallowed-option.yml +0 -0
- data/spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-admin-database.yml +13 -0
- data/spec/spec_tests/data/seed_list_discovery/replica-set/uri-with-auth.yml +12 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/uri-with-port.yml +0 -0
- data/spec/spec_tests/data/{dns_seedlist_discovery → seed_list_discovery/replica-set}/uri-with-two-hosts.yml +0 -0
- data/spec/spec_tests/data/transactions/retryable-abort-errorLabels.yml +2 -0
- data/spec/spec_tests/data/transactions/retryable-abort.yml +2 -0
- data/spec/spec_tests/data/transactions/retryable-commit-errorLabels.yml +2 -0
- data/spec/spec_tests/data/transactions/retryable-commit.yml +2 -0
- data/spec/spec_tests/data/transactions/retryable-writes.yml +2 -0
- data/spec/spec_tests/data/uri_options/connection-options.yml +60 -0
- data/spec/spec_tests/load_balancers_spec.rb +15 -0
- data/spec/spec_tests/retryable_reads_spec.rb +2 -2
- data/spec/spec_tests/retryable_writes_spec.rb +1 -1
- data/spec/spec_tests/sdam_integration_spec.rb +1 -1
- data/spec/spec_tests/sdam_monitoring_spec.rb +10 -5
- data/spec/spec_tests/sdam_spec.rb +1 -1
- data/spec/spec_tests/seed_list_discovery_spec.rb +118 -0
- data/spec/spec_tests/uri_options_spec.rb +4 -4
- data/spec/stress/fork_reconnect_stress_spec.rb +1 -5
- data/spec/stress/push_monitor_close_spec.rb +44 -0
- data/spec/support/certificates/atlas-ocsp-ca.crt +82 -90
- data/spec/support/certificates/atlas-ocsp.crt +127 -122
- data/spec/support/common_shortcuts.rb +2 -3
- data/spec/support/matchers.rb +13 -0
- data/spec/support/shared/auth_context.rb +16 -0
- data/spec/support/shared/session.rb +2 -2
- data/spec/support/spec_config.rb +10 -11
- data/spec/support/using_hash.rb +31 -0
- data/spec/support/utils.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1077 -1029
- metadata.gz.sig +0 -0
- data/lib/mongo/collection/view/builder/find_command.rb +0 -173
- data/lib/mongo/collection/view/builder/op_query.rb +0 -94
- data/lib/mongo/cursor/builder/get_more_command.rb +0 -80
- data/lib/mongo/cursor/builder/kill_cursors_command.rb +0 -111
- data/lib/mongo/cursor/builder/op_get_more.rb +0 -64
- data/lib/mongo/cursor/builder/op_kill_cursors.rb +0 -106
- data/lib/mongo/server/context.rb +0 -72
- data/spec/mongo/cursor/builder/op_kill_cursors_spec.rb +0 -66
- data/spec/runners/unified/using_hash.rb +0 -34
- data/spec/spec_tests/dns_seedlist_discovery_spec.rb +0 -79
- data/spec/support/event_subscriber.rb +0 -221
@@ -0,0 +1,200 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mrss
|
4
|
+
# Test event subscriber.
|
5
|
+
class EventSubscriber
|
6
|
+
|
7
|
+
# The mappings of event names to types.
|
8
|
+
MAPPINGS = {
|
9
|
+
'topology_opening_event' => Mongo::Monitoring::Event::TopologyOpening,
|
10
|
+
'topology_description_changed_event' => Mongo::Monitoring::Event::TopologyChanged,
|
11
|
+
'topology_closed_event' => Mongo::Monitoring::Event::TopologyClosed,
|
12
|
+
'server_opening_event' => Mongo::Monitoring::Event::ServerOpening,
|
13
|
+
'server_description_changed_event' => Mongo::Monitoring::Event::ServerDescriptionChanged,
|
14
|
+
'server_closed_event' => Mongo::Monitoring::Event::ServerClosed
|
15
|
+
}.freeze
|
16
|
+
|
17
|
+
attr_reader :all_events
|
18
|
+
|
19
|
+
attr_reader :started_events
|
20
|
+
|
21
|
+
attr_reader :succeeded_events
|
22
|
+
|
23
|
+
attr_reader :failed_events
|
24
|
+
|
25
|
+
attr_reader :published_events
|
26
|
+
|
27
|
+
# @param [ String ] name Optional name for the event subscriber.
|
28
|
+
def initialize(name: nil)
|
29
|
+
@mutex = Mutex.new
|
30
|
+
clear_events!
|
31
|
+
@name = name
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_s
|
35
|
+
%Q`#<EventSubscriber:#{@name ? "\"#{@name}\"" : '%x' % object_id} \
|
36
|
+
started=#{started_events.length} \
|
37
|
+
succeeded=#{succeeded_events.length} \
|
38
|
+
failed=#{failed_events.length} \
|
39
|
+
published=#{published_events.length}>`
|
40
|
+
end
|
41
|
+
|
42
|
+
alias :inspect :to_s
|
43
|
+
|
44
|
+
# Event retrieval
|
45
|
+
|
46
|
+
def select_started_events(cls)
|
47
|
+
started_events.select do |event|
|
48
|
+
event.is_a?(cls)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def select_succeeded_events(cls)
|
53
|
+
succeeded_events.select do |event|
|
54
|
+
event.is_a?(cls)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def select_completed_events(*classes)
|
59
|
+
(succeeded_events + failed_events).select do |event|
|
60
|
+
classes.any? { |c| c === event }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def select_published_events(cls)
|
65
|
+
published_events.select do |event|
|
66
|
+
event.is_a?(cls)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Filters command started events for the specified command name.
|
71
|
+
def command_started_events(command_name)
|
72
|
+
started_events.select do |event|
|
73
|
+
event.command[command_name]
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def non_auth_command_started_events
|
78
|
+
started_events.reject do |event|
|
79
|
+
%w(authenticate getnonce saslSstart saslContinue).any? do |cmd|
|
80
|
+
event.command[cmd]
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Locates command stated events for the specified command name,
|
86
|
+
# asserts that there is exactly one such event, and returns it.
|
87
|
+
def single_command_started_event(command_name, include_auth: false)
|
88
|
+
events = if include_auth
|
89
|
+
started_events
|
90
|
+
else
|
91
|
+
non_auth_command_started_events
|
92
|
+
end
|
93
|
+
events.select! do |event|
|
94
|
+
event.command[command_name]
|
95
|
+
end
|
96
|
+
if events.length != 1
|
97
|
+
raise "Expected a single #{command_name} event but we have #{events.length}"
|
98
|
+
end
|
99
|
+
events.first
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
# Get the first succeeded event published for the name, and then delete it.
|
104
|
+
#
|
105
|
+
# @param [ String ] name The event name.
|
106
|
+
#
|
107
|
+
# @return [ Event ] The matching event.
|
108
|
+
def first_event(name)
|
109
|
+
cls = MAPPINGS[name]
|
110
|
+
if cls.nil?
|
111
|
+
raise ArgumentError, "Bogus event name #{name}"
|
112
|
+
end
|
113
|
+
matching = succeeded_events.find do |event|
|
114
|
+
cls === event
|
115
|
+
end
|
116
|
+
succeeded_events.delete(matching)
|
117
|
+
matching
|
118
|
+
end
|
119
|
+
|
120
|
+
# Event recording
|
121
|
+
|
122
|
+
# Cache the started event.
|
123
|
+
#
|
124
|
+
# @param [ Event ] event The event.
|
125
|
+
def started(event)
|
126
|
+
@mutex.synchronize do
|
127
|
+
started_events << event
|
128
|
+
all_events << event
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# Cache the succeeded event.
|
133
|
+
#
|
134
|
+
# @param [ Event ] event The event.
|
135
|
+
def succeeded(event)
|
136
|
+
@mutex.synchronize do
|
137
|
+
succeeded_events << event
|
138
|
+
all_events << event
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# Cache the failed event.
|
143
|
+
#
|
144
|
+
# @param [ Event ] event The event.
|
145
|
+
def failed(event)
|
146
|
+
@mutex.synchronize do
|
147
|
+
failed_events << event
|
148
|
+
all_events << event
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
def published(event)
|
153
|
+
@mutex.synchronize do
|
154
|
+
published_events << event
|
155
|
+
all_events << event
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Clear all cached events.
|
160
|
+
def clear_events!
|
161
|
+
@all_events = []
|
162
|
+
@started_events = []
|
163
|
+
@succeeded_events = []
|
164
|
+
@failed_events = []
|
165
|
+
@published_events = []
|
166
|
+
self
|
167
|
+
end
|
168
|
+
end
|
169
|
+
# Only handles succeeded events correctly.
|
170
|
+
class PhasedEventSubscriber < EventSubscriber
|
171
|
+
def initialize
|
172
|
+
super
|
173
|
+
@phase_events = {}
|
174
|
+
end
|
175
|
+
|
176
|
+
def phase_finished(phase_index)
|
177
|
+
@phase_events[phase_index] = succeeded_events
|
178
|
+
@succeeded_events = []
|
179
|
+
end
|
180
|
+
|
181
|
+
def phase_events(phase_index)
|
182
|
+
@phase_events[phase_index]
|
183
|
+
end
|
184
|
+
|
185
|
+
def event_count
|
186
|
+
@phase_events.inject(0) do |sum, event|
|
187
|
+
sum + event.length
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
class VerboseEventSubscriber < EventSubscriber
|
193
|
+
%w(started succeeded failed published).each do |meth|
|
194
|
+
define_method(meth) do |event|
|
195
|
+
puts event.summary
|
196
|
+
super(event)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
@@ -48,19 +48,24 @@ module Mrss
|
|
48
48
|
url = dl['archive']['url']
|
49
49
|
end
|
50
50
|
rescue MissingDownloadUrl
|
51
|
-
if %w(
|
52
|
-
#
|
53
|
-
#
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
ensure
|
61
|
-
io.close
|
62
|
-
end
|
51
|
+
if %w(2.6 3.0).include?(desired_version) && arch == 'ubuntu1604'
|
52
|
+
# 2.6 and 3.0 are only available for ubuntu1204 and ubuntu1404.
|
53
|
+
# Those ubuntus have ancient Pythons that don't work due to not
|
54
|
+
# implementing recent TLS protocols.
|
55
|
+
# Because of this we test on ubuntu1604 which has a newer Python.
|
56
|
+
# But we still need to retrieve ubuntu1404-targeting builds.
|
57
|
+
url = self.class.new('3.2', arch).download_url
|
58
|
+
unless url.include?('3.2.')
|
59
|
+
raise 'URL not in expected format'
|
63
60
|
end
|
61
|
+
url = case desired_version
|
62
|
+
when '2.6'
|
63
|
+
url.sub(/\b3\.2\.\d+/, '2.6.12')
|
64
|
+
when '3.0'
|
65
|
+
url.sub(/\b3\.2\.\d+/, '3.0.15')
|
66
|
+
else
|
67
|
+
raise NotImplementedError
|
68
|
+
end.sub('ubuntu1604', 'ubuntu1404')
|
64
69
|
else
|
65
70
|
raise
|
66
71
|
end
|
@@ -55,7 +55,7 @@ FROM <%= base_image %>
|
|
55
55
|
# Ruby runtime dependencies: libyaml-0-2
|
56
56
|
# Compiling ruby libraries: gcc make
|
57
57
|
# Compiling pyhton packages: python2.7-dev
|
58
|
-
# JRuby: openjdk-8-
|
58
|
+
# JRuby: openjdk-8-jdk-headless
|
59
59
|
# Server dependencies: libsnmp30 libcurl3/libcurl4
|
60
60
|
# Determining OS we are running on: lsb-release
|
61
61
|
# Load balancer testing: haproxy
|
@@ -68,6 +68,7 @@ FROM <%= base_image %>
|
|
68
68
|
# nokogiri: zlib1g-dev
|
69
69
|
# Mongoid testing: tzdata shared-mime-info
|
70
70
|
# Mongoid application testing: nodejs (8.x or newer)
|
71
|
+
# Test suite: procps for ps (to kill JRubies)
|
71
72
|
#
|
72
73
|
# We currently use Python 2-compatible version of mtools, which
|
73
74
|
# is installable via pip (which uses Python 2). All of the MongoDB
|
@@ -75,7 +76,7 @@ FROM <%= base_image %>
|
|
75
76
|
# therefore install python-pip in all configurations here.
|
76
77
|
|
77
78
|
<% packages = %w(
|
78
|
-
lsb-release bzip2 curl zsh
|
79
|
+
procps lsb-release bzip2 curl zsh
|
79
80
|
git make gcc libyaml-0-2 libgmp-dev zlib1g-dev libsnappy-dev
|
80
81
|
krb5-user krb5-kdc krb5-admin-server libsasl2-dev libsasl2-modules-gssapi-mit
|
81
82
|
haproxy
|
@@ -103,11 +104,11 @@ FROM <%= base_image %>
|
|
103
104
|
<% end %>
|
104
105
|
|
105
106
|
<% if distro =~ /debian10/ %>
|
106
|
-
<% packages << 'openjdk-11-
|
107
|
+
<% packages << 'openjdk-11-jdk-headless' %>
|
107
108
|
<% elsif distro =~ /ubuntu1404/ %>
|
108
109
|
# Ubuntu 14.04 only has openjdk 7, this is too old to be useful
|
109
110
|
<% else %>
|
110
|
-
<% packages << 'openjdk-8-
|
111
|
+
<% packages << 'openjdk-8-jdk-headless' %>
|
111
112
|
<% end %>
|
112
113
|
|
113
114
|
# ubuntu1404, ubuntu1604: libcurl3
|
data/spec/shared/shlib/server.sh
CHANGED
@@ -10,21 +10,21 @@ set_fcv() {
|
|
10
10
|
|
11
11
|
add_uri_option() {
|
12
12
|
opt=$1
|
13
|
-
|
13
|
+
|
14
14
|
if ! echo $MONGODB_URI |sed -e s,//,, |grep -q /; then
|
15
15
|
MONGODB_URI="$MONGODB_URI/"
|
16
16
|
fi
|
17
|
-
|
17
|
+
|
18
18
|
if ! echo $MONGODB_URI |grep -q '?'; then
|
19
19
|
MONGODB_URI="$MONGODB_URI?"
|
20
20
|
fi
|
21
|
-
|
21
|
+
|
22
22
|
MONGODB_URI="$MONGODB_URI&$opt"
|
23
23
|
}
|
24
24
|
|
25
25
|
prepare_server() {
|
26
26
|
arch=$1
|
27
|
-
|
27
|
+
|
28
28
|
if test -n "$USE_OPT_MONGODB"; then
|
29
29
|
export BINDIR=/opt/mongodb/bin
|
30
30
|
export PATH=$BINDIR:$PATH
|
@@ -39,7 +39,7 @@ prepare_server() {
|
|
39
39
|
else
|
40
40
|
download_version="$MONGODB_VERSION"
|
41
41
|
fi
|
42
|
-
|
42
|
+
|
43
43
|
url=`$(dirname $0)/get-mongodb-download-url $download_version $arch`
|
44
44
|
|
45
45
|
prepare_server_from_url $url
|
@@ -80,7 +80,7 @@ install_mlaunch_pip() {
|
|
80
80
|
# mlaunch is preinstalled in the docker image, do not install it here
|
81
81
|
return
|
82
82
|
fi
|
83
|
-
|
83
|
+
|
84
84
|
python -V || true
|
85
85
|
python3 -V || true
|
86
86
|
pythonpath="$MONGO_ORCHESTRATION_HOME"/python
|
@@ -96,20 +96,20 @@ install_mlaunch_git() {
|
|
96
96
|
python3 -V || true
|
97
97
|
which pip || true
|
98
98
|
which pip3 || true
|
99
|
-
|
99
|
+
|
100
100
|
if false; then
|
101
101
|
if ! virtualenv --version; then
|
102
102
|
python3 `which pip3` install --user virtualenv
|
103
103
|
export PATH=$HOME/.local/bin:$PATH
|
104
104
|
virtualenv --version
|
105
105
|
fi
|
106
|
-
|
106
|
+
|
107
107
|
venvpath="$MONGO_ORCHESTRATION_HOME"/venv
|
108
108
|
virtualenv -p python3 $venvpath
|
109
109
|
. $venvpath/bin/activate
|
110
|
-
|
110
|
+
|
111
111
|
pip3 install psutil pymongo
|
112
|
-
|
112
|
+
|
113
113
|
git clone $repo mlaunch
|
114
114
|
cd mlaunch
|
115
115
|
git checkout origin/$branch
|
@@ -118,13 +118,13 @@ install_mlaunch_git() {
|
|
118
118
|
else
|
119
119
|
pip install --user 'virtualenv==13'
|
120
120
|
export PATH=$HOME/.local/bin:$PATH
|
121
|
-
|
121
|
+
|
122
122
|
venvpath="$MONGO_ORCHESTRATION_HOME"/venv
|
123
123
|
virtualenv $venvpath
|
124
124
|
. $venvpath/bin/activate
|
125
|
-
|
125
|
+
|
126
126
|
pip install psutil pymongo
|
127
|
-
|
127
|
+
|
128
128
|
git clone $repo mlaunch
|
129
129
|
(cd mlaunch &&
|
130
130
|
git checkout origin/$branch &&
|
@@ -133,26 +133,32 @@ install_mlaunch_git() {
|
|
133
133
|
fi
|
134
134
|
}
|
135
135
|
|
136
|
+
# This function sets followong global variables:
|
137
|
+
# server_cert_path
|
138
|
+
# server_ca_path
|
139
|
+
# server_client_cert_path
|
140
|
+
#
|
141
|
+
# These variables are used later to connect to processes via mongo client.
|
136
142
|
calculate_server_args() {
|
137
143
|
local mongo_version=`echo $MONGODB_VERSION |tr -d .`
|
138
|
-
|
144
|
+
|
139
145
|
if test -z "$mongo_version"; then
|
140
146
|
echo "$MONGODB_VERSION must be set and not contain only dots" 1>&2
|
141
147
|
exit 3
|
142
148
|
fi
|
143
|
-
|
149
|
+
|
144
150
|
if test $mongo_version = latest; then
|
145
151
|
mongo_version=49
|
146
152
|
fi
|
147
153
|
|
148
154
|
local args="--setParameter enableTestCommands=1"
|
149
|
-
|
155
|
+
|
150
156
|
if test $mongo_version -ge 50; then
|
151
157
|
args="$args --setParameter acceptApiVersion2=1"
|
152
158
|
elif test $mongo_version -ge 47; then
|
153
159
|
args="$args --setParameter acceptAPIVersion2=1"
|
154
160
|
fi
|
155
|
-
|
161
|
+
|
156
162
|
# diagnosticDataCollectionEnabled is a mongod-only parameter on server 3.2,
|
157
163
|
# and mlaunch does not support specifying mongod-only parameters:
|
158
164
|
# https://github.com/rueckstiess/mtools/issues/696
|
@@ -209,7 +215,6 @@ calculate_server_args() {
|
|
209
215
|
fi
|
210
216
|
fi
|
211
217
|
|
212
|
-
local server_cert_path server_ca_path server_client_cert_path
|
213
218
|
if test "$SSL" = ssl || test -n "$OCSP_ALGORITHM"; then
|
214
219
|
if test -n "$OCSP_ALGORITHM"; then
|
215
220
|
if test "$OCSP_MUST_STAPLE" = 1; then
|
@@ -288,7 +293,7 @@ calculate_server_args() {
|
|
288
293
|
ocsp_args="$ocsp_args --fault $OCSP_STATUS"
|
289
294
|
fi
|
290
295
|
fi
|
291
|
-
|
296
|
+
|
292
297
|
OCSP_ARGS="$ocsp_args"
|
293
298
|
SERVER_ARGS="$args"
|
294
299
|
URI_OPTIONS="$uri_options"
|
@@ -306,12 +311,57 @@ launch_server() {
|
|
306
311
|
local dbdir="$1"
|
307
312
|
python -m mtools.mlaunch.mlaunch --dir "$dbdir" --binarypath "$BINDIR" $SERVER_ARGS
|
308
313
|
|
314
|
+
if test "$TOPOLOGY" = sharded-cluster && test $MONGODB_VERSION = 3.6; then
|
315
|
+
# On 3.6 server the sessions collection is not immediately available,
|
316
|
+
# so we run the refreshLogicalSessionCacheNow command on the config server
|
317
|
+
# and again on each mongos in order for the mongoses
|
318
|
+
# to correctly report logicalSessionTimeoutMinutes.
|
319
|
+
mongos_regex="\s*mongos\s+([0-9]+)\s+running\s+[0-9]+"
|
320
|
+
config_server_regex="\s*config\sserver\s+([0-9]+)\s+running\s+[0-9]+"
|
321
|
+
config_server=""
|
322
|
+
mongoses=()
|
323
|
+
if test "$AUTH" = auth
|
324
|
+
then
|
325
|
+
base_url="mongodb://bob:pwd123@localhost"
|
326
|
+
else
|
327
|
+
base_url="mongodb://localhost"
|
328
|
+
fi
|
329
|
+
if test "$SSL" = "ssl"
|
330
|
+
then
|
331
|
+
mongo_command="${BINDIR}/mongo --ssl --sslPEMKeyFile $server_cert_path --sslCAFile $server_ca_path"
|
332
|
+
else
|
333
|
+
mongo_command="${BINDIR}/mongo"
|
334
|
+
fi
|
335
|
+
|
336
|
+
while read -r line
|
337
|
+
do
|
338
|
+
if [[ $line =~ $config_server_regex ]]
|
339
|
+
then
|
340
|
+
port="${BASH_REMATCH[1]}"
|
341
|
+
config_server="${base_url}:${port}"
|
342
|
+
fi
|
343
|
+
if [[ $line =~ $mongos_regex ]]
|
344
|
+
then
|
345
|
+
port="${BASH_REMATCH[1]}"
|
346
|
+
mongoses+=("${base_url}:${port}")
|
347
|
+
fi
|
348
|
+
done < <(python -m mtools.mlaunch.mlaunch list --dir "$dbdir" --binarypath "$BINDIR")
|
349
|
+
|
350
|
+
if [ -n "$config_server" ]; then
|
351
|
+
${mongo_command} "$config_server" --eval 'db.adminCommand("refreshLogicalSessionCacheNow")'
|
352
|
+
for mongos in ${mongoses[*]}
|
353
|
+
do
|
354
|
+
${mongo_command} "$mongos" --eval 'db.adminCommand("refreshLogicalSessionCacheNow")'
|
355
|
+
done
|
356
|
+
fi
|
357
|
+
fi
|
358
|
+
|
309
359
|
if test "$TOPOLOGY" = load-balanced; then
|
310
360
|
if test -z "$haproxy_config"; then
|
311
361
|
echo haproxy_config should have been set 1>&2
|
312
362
|
exit 3
|
313
363
|
fi
|
314
|
-
|
364
|
+
|
315
365
|
haproxy -D -f $haproxy_config -p $mongodb_dir/haproxy.pid
|
316
366
|
fi
|
317
367
|
}
|
@@ -40,7 +40,7 @@ describe 'Cmap' do
|
|
40
40
|
context("#{spec.description} (#{file.sub(%r'.*/data/cmap/', '')})") do
|
41
41
|
|
42
42
|
before do
|
43
|
-
subscriber = EventSubscriber.new
|
43
|
+
subscriber = Mrss::EventSubscriber.new
|
44
44
|
|
45
45
|
monitoring = Mongo::Monitoring.new(monitoring: false)
|
46
46
|
monitoring.subscribe(Mongo::Monitoring::CONNECTION_POOL, subscriber)
|
@@ -76,6 +76,9 @@ describe 'Cmap' do
|
|
76
76
|
allow(socket).to receive(:alive?).and_return(true)
|
77
77
|
|
78
78
|
allow_any_instance_of(Mongo::Server::Connection).to receive(:do_connect).and_return(socket)
|
79
|
+
if @server.load_balancer?
|
80
|
+
allow_any_instance_of(Mongo::Server::Connection).to receive(:service_id).and_return('very fake')
|
81
|
+
end
|
79
82
|
spec.run
|
80
83
|
end
|
81
84
|
|
@@ -24,7 +24,7 @@ describe 'Command Monitoring Events' do
|
|
24
24
|
end
|
25
25
|
|
26
26
|
let(:subscriber) do
|
27
|
-
EventSubscriber.new
|
27
|
+
Mrss::EventSubscriber.new
|
28
28
|
end
|
29
29
|
|
30
30
|
let(:monitoring) do
|
@@ -54,7 +54,7 @@ describe 'Command Monitoring Events' do
|
|
54
54
|
|
55
55
|
def check_event(subscriber, index, expectation)
|
56
56
|
subscriber.all_events.length.should > index
|
57
|
-
# TODO move this filtering into EventSubscriber
|
57
|
+
# TODO move this filtering into Mrss::EventSubscriber
|
58
58
|
events = subscriber.all_events.reject do |event|
|
59
59
|
(
|
60
60
|
event.is_a?(Mongo::Monitoring::Event::CommandStarted) ||
|
@@ -43,14 +43,13 @@ tests:
|
|
43
43
|
filter: { _id: { $gt: 1 } }
|
44
44
|
sort: { _id: 1 }
|
45
45
|
skip: {"$numberLong": "2"}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
$showDiskLoc: false
|
46
|
+
comment: "test"
|
47
|
+
hint: { _id: 1 }
|
48
|
+
max: { _id: 6 }
|
49
|
+
maxTimeMS: 6000
|
50
|
+
min: { _id: 0 }
|
51
|
+
returnKey: false
|
52
|
+
showRecordId: false
|
54
53
|
expectations:
|
55
54
|
-
|
56
55
|
command_started_event:
|
@@ -195,8 +194,9 @@ tests:
|
|
195
194
|
- { $numberLong: "42" }
|
196
195
|
command_name: "killCursors"
|
197
196
|
-
|
198
|
-
description: "A successful find event with a getmore and the server kills the cursor"
|
197
|
+
description: "A successful find event with a getmore and the server kills the cursor (<= 4.4)"
|
199
198
|
ignore_if_server_version_less_than: "3.1"
|
199
|
+
ignore_if_server_version_greater_than: "4.4"
|
200
200
|
ignore_if_topology_type:
|
201
201
|
- "sharded"
|
202
202
|
operation:
|
@@ -1,6 +1,7 @@
|
|
1
1
|
data:
|
2
2
|
- {_id: 1, x: 'ping'}
|
3
3
|
minServerVersion: '3.4'
|
4
|
+
serverless: 'forbid'
|
4
5
|
|
5
6
|
tests:
|
6
7
|
-
|
@@ -11,7 +12,7 @@ tests:
|
|
11
12
|
pipeline:
|
12
13
|
- $match:
|
13
14
|
x: 'PING'
|
14
|
-
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/
|
15
|
+
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document
|
15
16
|
outcome:
|
16
17
|
result:
|
17
18
|
- {_id: 1, x: 'ping'}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
data:
|
2
2
|
- {_id: 1, x: 'PING'}
|
3
3
|
minServerVersion: '3.4'
|
4
|
+
serverless: 'forbid'
|
4
5
|
|
5
6
|
tests:
|
6
7
|
-
|
@@ -9,7 +10,7 @@ tests:
|
|
9
10
|
name: countDocuments
|
10
11
|
arguments:
|
11
12
|
filter: { x: 'ping' }
|
12
|
-
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/
|
13
|
+
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document
|
13
14
|
|
14
15
|
outcome:
|
15
16
|
result: 1
|
@@ -2,6 +2,7 @@ data:
|
|
2
2
|
- {_id: 1, string: 'PING'}
|
3
3
|
- {_id: 2, string: 'ping'}
|
4
4
|
minServerVersion: '3.4'
|
5
|
+
serverless: 'forbid'
|
5
6
|
|
6
7
|
tests:
|
7
8
|
-
|
@@ -10,7 +11,7 @@ tests:
|
|
10
11
|
name: distinct
|
11
12
|
arguments:
|
12
13
|
fieldName: "string"
|
13
|
-
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/
|
14
|
+
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document
|
14
15
|
|
15
16
|
outcome:
|
16
17
|
result:
|
@@ -1,6 +1,7 @@
|
|
1
1
|
data:
|
2
2
|
- {_id: 1, x: 'ping'}
|
3
3
|
minServerVersion: '3.4'
|
4
|
+
serverless: 'forbid'
|
4
5
|
|
5
6
|
tests:
|
6
7
|
-
|
@@ -9,7 +10,7 @@ tests:
|
|
9
10
|
name: "find"
|
10
11
|
arguments:
|
11
12
|
filter: {x: 'PING'}
|
12
|
-
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/
|
13
|
+
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document
|
13
14
|
outcome:
|
14
15
|
result:
|
15
16
|
- {_id: 1, x: 'ping'}
|
@@ -6,8 +6,9 @@ data:
|
|
6
6
|
- {_id: 5, x: 'pONg'}
|
7
7
|
|
8
8
|
minServerVersion: '3.4'
|
9
|
+
serverless: 'forbid'
|
9
10
|
|
10
|
-
# See: https://docs.mongodb.com/
|
11
|
+
# See: https://docs.mongodb.com/manual/reference/collation/#collation-document
|
11
12
|
tests:
|
12
13
|
-
|
13
14
|
description: "BulkWrite with delete operations and collation"
|
@@ -3,6 +3,7 @@ data:
|
|
3
3
|
- {_id: 2, x: 'ping'}
|
4
4
|
- {_id: 3, x: 'pINg'}
|
5
5
|
minServerVersion: '3.4'
|
6
|
+
serverless: 'forbid'
|
6
7
|
|
7
8
|
tests:
|
8
9
|
-
|
@@ -12,7 +13,7 @@ tests:
|
|
12
13
|
arguments:
|
13
14
|
filter:
|
14
15
|
x: 'PING'
|
15
|
-
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/
|
16
|
+
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document
|
16
17
|
|
17
18
|
outcome:
|
18
19
|
result:
|
@@ -3,6 +3,7 @@ data:
|
|
3
3
|
- {_id: 2, x: 'ping'}
|
4
4
|
- {_id: 3, x: 'pINg'}
|
5
5
|
minServerVersion: '3.4'
|
6
|
+
serverless: 'forbid'
|
6
7
|
|
7
8
|
tests:
|
8
9
|
-
|
@@ -11,7 +12,7 @@ tests:
|
|
11
12
|
name: "deleteOne"
|
12
13
|
arguments:
|
13
14
|
filter: {x: 'PING'}
|
14
|
-
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/
|
15
|
+
collation: { locale: 'en_US', strength: 2 } # https://docs.mongodb.com/manual/reference/collation/#collation-document
|
15
16
|
|
16
17
|
outcome:
|
17
18
|
result:
|