mongo 2.20.1 → 2.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/Rakefile +2 -2
- data/lib/mongo/address.rb +22 -3
- data/lib/mongo/auth/aws/credentials_retriever.rb +70 -17
- data/lib/mongo/auth/base.rb +1 -1
- data/lib/mongo/bulk_write.rb +35 -2
- data/lib/mongo/client.rb +38 -6
- data/lib/mongo/client_encryption.rb +6 -3
- data/lib/mongo/cluster/reapers/cursor_reaper.rb +6 -1
- data/lib/mongo/cluster/sdam_flow.rb +20 -7
- data/lib/mongo/cluster.rb +14 -4
- data/lib/mongo/collection/helpers.rb +1 -1
- data/lib/mongo/collection/view/aggregation/behavior.rb +131 -0
- data/lib/mongo/collection/view/aggregation.rb +33 -99
- data/lib/mongo/collection/view/builder/aggregation.rb +1 -7
- data/lib/mongo/collection/view/change_stream.rb +80 -27
- data/lib/mongo/collection/view/iterable.rb +76 -60
- data/lib/mongo/collection/view/map_reduce.rb +25 -8
- data/lib/mongo/collection/view/readable.rb +79 -30
- data/lib/mongo/collection/view/writable.rb +109 -48
- data/lib/mongo/collection/view.rb +43 -3
- data/lib/mongo/collection.rb +158 -23
- data/lib/mongo/crypt/auto_encrypter.rb +4 -6
- data/lib/mongo/crypt/binding.rb +4 -4
- data/lib/mongo/crypt/context.rb +20 -14
- data/lib/mongo/crypt/encryption_io.rb +56 -26
- data/lib/mongo/crypt/explicit_encrypter.rb +49 -20
- data/lib/mongo/crypt/explicit_encryption_context.rb +17 -11
- data/lib/mongo/crypt/kms/azure/credentials_retriever.rb +22 -6
- data/lib/mongo/crypt/kms/gcp/credentials_retriever.rb +29 -4
- data/lib/mongo/csot_timeout_holder.rb +119 -0
- data/lib/mongo/cursor/kill_spec.rb +5 -2
- data/lib/mongo/cursor/nontailable.rb +27 -0
- data/lib/mongo/cursor.rb +86 -24
- data/lib/mongo/cursor_host.rb +82 -0
- data/lib/mongo/database/view.rb +81 -14
- data/lib/mongo/database.rb +88 -18
- data/lib/mongo/error/operation_failure.rb +209 -204
- data/lib/mongo/error/server_timeout_error.rb +12 -0
- data/lib/mongo/error/socket_timeout_error.rb +3 -1
- data/lib/mongo/error/timeout_error.rb +23 -0
- data/lib/mongo/error.rb +2 -0
- data/lib/mongo/grid/fs_bucket.rb +45 -12
- data/lib/mongo/grid/stream/read.rb +15 -1
- data/lib/mongo/grid/stream/write.rb +21 -4
- data/lib/mongo/index/view.rb +77 -16
- data/lib/mongo/operation/context.rb +40 -2
- data/lib/mongo/operation/create_search_indexes/op_msg.rb +2 -2
- data/lib/mongo/operation/delete/op_msg.rb +2 -1
- data/lib/mongo/operation/drop_search_index/op_msg.rb +2 -2
- data/lib/mongo/operation/find/op_msg.rb +45 -0
- data/lib/mongo/operation/get_more/op_msg.rb +33 -0
- data/lib/mongo/operation/insert/op_msg.rb +3 -2
- data/lib/mongo/operation/insert/result.rb +4 -2
- data/lib/mongo/operation/list_collections/result.rb +1 -1
- data/lib/mongo/operation/map_reduce/result.rb +1 -1
- data/lib/mongo/operation/op_msg_base.rb +3 -1
- data/lib/mongo/operation/result.rb +26 -5
- data/lib/mongo/operation/shared/executable.rb +12 -1
- data/lib/mongo/operation/shared/op_msg_executable.rb +4 -1
- data/lib/mongo/operation/shared/response_handling.rb +3 -3
- data/lib/mongo/operation/shared/sessions_supported.rb +1 -1
- data/lib/mongo/operation/shared/timed.rb +52 -0
- data/lib/mongo/operation/shared/write.rb +4 -1
- data/lib/mongo/operation/update/op_msg.rb +2 -1
- data/lib/mongo/operation/update_search_index/op_msg.rb +2 -2
- data/lib/mongo/operation.rb +1 -0
- data/lib/mongo/protocol/message.rb +1 -4
- data/lib/mongo/protocol/msg.rb +2 -2
- data/lib/mongo/retryable/read_worker.rb +69 -29
- data/lib/mongo/retryable/write_worker.rb +49 -18
- data/lib/mongo/retryable.rb +8 -2
- data/lib/mongo/server/connection.rb +11 -5
- data/lib/mongo/server/connection_base.rb +22 -2
- data/lib/mongo/server/connection_pool.rb +32 -14
- data/lib/mongo/server/description/features.rb +1 -1
- data/lib/mongo/server/description.rb +18 -5
- data/lib/mongo/server/monitor.rb +7 -4
- data/lib/mongo/server/pending_connection.rb +7 -3
- data/lib/mongo/server/{round_trip_time_averager.rb → round_trip_time_calculator.rb} +25 -7
- data/lib/mongo/server.rb +11 -6
- data/lib/mongo/server_selector/base.rb +25 -9
- data/lib/mongo/session.rb +78 -9
- data/lib/mongo/socket/ssl.rb +109 -17
- data/lib/mongo/socket/tcp.rb +40 -6
- data/lib/mongo/socket.rb +154 -25
- data/lib/mongo/uri/options_mapper.rb +1 -0
- data/lib/mongo/version.rb +1 -1
- data/lib/mongo.rb +1 -0
- data/spec/atlas/atlas_connectivity_spec.rb +4 -0
- data/spec/atlas/operations_spec.rb +4 -0
- data/spec/integration/client_side_encryption/auto_encryption_mongocryptd_spawn_spec.rb +2 -1
- data/spec/integration/client_side_encryption/auto_encryption_spec.rb +494 -487
- data/spec/integration/client_side_encryption/on_demand_aws_credentials_spec.rb +1 -1
- data/spec/integration/client_side_encryption/range_explicit_encryption_prose_spec.rb +66 -22
- data/spec/integration/client_side_operations_timeout/encryption_prose_spec.rb +131 -0
- data/spec/integration/connection_pool_populator_spec.rb +2 -0
- data/spec/integration/cursor_pinning_spec.rb +15 -60
- data/spec/integration/cursor_reaping_spec.rb +1 -1
- data/spec/integration/docs_examples_spec.rb +1 -1
- data/spec/integration/operation_failure_code_spec.rb +1 -1
- data/spec/integration/operation_failure_message_spec.rb +3 -3
- data/spec/integration/retryable_errors_spec.rb +2 -2
- data/spec/integration/sdam_error_handling_spec.rb +2 -1
- data/spec/integration/search_indexes_prose_spec.rb +4 -0
- data/spec/integration/server_spec.rb +4 -3
- data/spec/integration/transactions_api_examples_spec.rb +2 -0
- data/spec/kerberos/kerberos_spec.rb +4 -0
- data/spec/lite_spec_helper.rb +3 -1
- data/spec/mongo/auth/user/view_spec.rb +1 -1
- data/spec/mongo/caching_cursor_spec.rb +1 -1
- data/spec/mongo/client_encryption_spec.rb +1 -0
- data/spec/mongo/client_spec.rb +158 -4
- data/spec/mongo/collection/view/aggregation_spec.rb +14 -39
- data/spec/mongo/collection/view/change_stream_spec.rb +3 -3
- data/spec/mongo/collection_spec.rb +5 -6
- data/spec/mongo/crypt/auto_encrypter_spec.rb +14 -12
- data/spec/mongo/crypt/data_key_context_spec.rb +3 -1
- data/spec/mongo/crypt/explicit_encryption_context_spec.rb +2 -2
- data/spec/mongo/crypt/handle_spec.rb +1 -1
- data/spec/mongo/cursor_spec.rb +26 -9
- data/spec/mongo/error/operation_failure_heavy_spec.rb +2 -2
- data/spec/mongo/operation/context_spec.rb +79 -0
- data/spec/mongo/operation/create/op_msg_spec.rb +106 -110
- data/spec/mongo/operation/delete/op_msg_spec.rb +6 -5
- data/spec/mongo/operation/find/op_msg_spec.rb +66 -0
- data/spec/mongo/operation/get_more/op_msg_spec.rb +65 -0
- data/spec/mongo/operation/insert/op_msg_spec.rb +128 -131
- data/spec/mongo/operation/shared/csot/examples.rb +113 -0
- data/spec/mongo/query_cache_spec.rb +243 -225
- data/spec/mongo/retryable_spec.rb +1 -0
- data/spec/mongo/server/round_trip_time_calculator_spec.rb +120 -0
- data/spec/mongo/socket/ssl_spec.rb +0 -10
- data/spec/runners/change_streams/test.rb +2 -2
- data/spec/runners/crud/operation.rb +1 -1
- data/spec/runners/crud/verifier.rb +3 -1
- data/spec/runners/transactions/operation.rb +4 -6
- data/spec/runners/unified/ambiguous_operations.rb +13 -0
- data/spec/runners/unified/assertions.rb +4 -0
- data/spec/runners/unified/change_stream_operations.rb +14 -24
- data/spec/runners/unified/crud_operations.rb +82 -59
- data/spec/runners/unified/ddl_operations.rb +38 -7
- data/spec/runners/unified/grid_fs_operations.rb +37 -2
- data/spec/runners/unified/support_operations.rb +43 -4
- data/spec/runners/unified/test.rb +22 -10
- data/spec/runners/unified.rb +1 -1
- data/spec/solo/clean_exit_spec.rb +2 -0
- data/spec/spec_tests/client_side_operations_timeout_spec.rb +15 -0
- data/spec/spec_tests/data/change_streams_unified/change-streams-clusterTime.yml +3 -1
- data/spec/spec_tests/data/change_streams_unified/change-streams-disambiguatedPaths.yml +3 -1
- data/spec/spec_tests/data/change_streams_unified/change-streams-errors.yml +3 -1
- data/spec/spec_tests/data/change_streams_unified/change-streams-pre_and_post_images.yml +1 -1
- data/spec/spec_tests/data/change_streams_unified/change-streams-resume-allowlist.yml +1 -1
- data/spec/spec_tests/data/change_streams_unified/change-streams-resume-errorLabels.yml +1 -1
- data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +1 -1
- data/spec/spec_tests/data/client_side_encryption/badQueries.yml +2 -1
- data/spec/spec_tests/data/client_side_encryption/timeoutMS.yml +67 -0
- data/spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml +87 -0
- data/spec/spec_tests/data/client_side_operations_timeout/change-streams.yml +358 -0
- data/spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml +129 -0
- data/spec/spec_tests/data/client_side_operations_timeout/command-execution.yml +250 -0
- data/spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml +113 -0
- data/spec/spec_tests/data/client_side_operations_timeout/cursors.yml +70 -0
- data/spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml +3982 -0
- data/spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml +96 -0
- data/spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml +3236 -0
- data/spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml +207 -0
- data/spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml +152 -0
- data/spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml +182 -0
- data/spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml +100 -0
- data/spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml +249 -0
- data/spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml +204 -0
- data/spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml +307 -0
- data/spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml +1877 -0
- data/spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml +1918 -0
- data/spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml +1676 -0
- data/spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml +2824 -0
- data/spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml +168 -0
- data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml +171 -0
- data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml +168 -0
- data/spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml +247 -0
- data/spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml +181 -0
- data/spec/spec_tests/data/crud_unified/aggregate-write-readPreference.yml +4 -0
- data/spec/spec_tests/data/crud_unified/db-aggregate-write-readPreference.yml +4 -0
- data/spec/spec_tests/data/crud_unified/find-test-all-options.yml +29 -0
- data/spec/spec_tests/server_selection_rtt_spec.rb +6 -6
- data/spec/support/certificates/atlas-ocsp-ca.crt +81 -83
- data/spec/support/certificates/atlas-ocsp.crt +107 -107
- data/spec/support/cluster_tools.rb +3 -3
- data/spec/support/common_shortcuts.rb +2 -2
- data/spec/support/crypt/encrypted_fields/range-encryptedFields-Date.json +1 -1
- data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalNoPrecision.json +1 -1
- data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalPrecision.json +1 -1
- data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoubleNoPrecision.json +1 -1
- data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoublePrecision.json +1 -1
- data/spec/support/crypt/encrypted_fields/range-encryptedFields-Int.json +1 -1
- data/spec/support/crypt/encrypted_fields/range-encryptedFields-Long.json +1 -1
- data/spec/support/shared/session.rb +2 -2
- data/spec/support/spec_setup.rb +2 -2
- data/spec/support/utils.rb +3 -1
- metadata +78 -91
- data/spec/mongo/server/round_trip_time_averager_spec.rb +0 -48
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml +0 -242
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml +0 -423
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml +0 -183
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml +0 -240
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml +0 -236
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml +0 -253
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml +0 -1688
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml +0 -294
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml +0 -906
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml +0 -1685
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml +0 -1681
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml +0 -1698
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml +0 -330
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml +0 -425
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml +0 -227
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml +0 -328
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml +0 -320
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml +0 -337
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml +0 -914
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml +0 -293
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml +0 -519
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml +0 -912
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml +0 -908
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml +0 -925
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml +0 -326
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml +0 -425
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml +0 -225
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml +0 -324
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml +0 -320
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml +0 -339
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml +0 -242
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml +0 -424
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml +0 -183
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml +0 -240
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml +0 -236
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml +0 -255
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml +0 -242
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml +0 -423
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml +0 -183
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml +0 -240
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml +0 -236
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml +0 -255
- data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml +0 -44
@@ -110,8 +110,8 @@ shared_examples 'a failed operation using a session' do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
it 'raises an error' do
|
113
|
-
expect([Mongo::Error::OperationFailure,
|
114
|
-
Mongo::Error::BulkWriteError]).to
|
113
|
+
expect([Mongo::Error::OperationFailure::Family,
|
114
|
+
Mongo::Error::BulkWriteError].any? { |e| e === operation_result }).to be true
|
115
115
|
end
|
116
116
|
|
117
117
|
it 'updates the last use value' do
|
data/spec/support/spec_setup.rb
CHANGED
@@ -28,7 +28,7 @@ class SpecSetup
|
|
28
28
|
# more users to any other databases.
|
29
29
|
begin
|
30
30
|
create_user(client, SpecConfig.instance.root_user)
|
31
|
-
rescue Mongo::Error::OperationFailure => e
|
31
|
+
rescue Mongo::Error::OperationFailure::Family => e
|
32
32
|
# When testing a cluster that requires auth, root user is already set up
|
33
33
|
# and it is not creatable without auth.
|
34
34
|
# Seems like every mongodb version has its own error message
|
@@ -61,7 +61,7 @@ class SpecSetup
|
|
61
61
|
users = client.use('admin').database.users
|
62
62
|
begin
|
63
63
|
users.create(user)
|
64
|
-
rescue Mongo::Error::OperationFailure => e
|
64
|
+
rescue Mongo::Error::OperationFailure::Family => e
|
65
65
|
if e.message =~ /User.*already exists/
|
66
66
|
users.remove(user.name)
|
67
67
|
users.create(user)
|
data/spec/support/utils.rb
CHANGED
@@ -330,8 +330,10 @@ module Utils
|
|
330
330
|
when 'long'
|
331
331
|
expected_class = BSON::Int64
|
332
332
|
expected_key = '$numberLong'
|
333
|
+
when %w[int long]
|
334
|
+
return actual.is_a?(Numeric) || actual.is_a?(BSON::Int32) || actual.is_a?(BSON::Int64)
|
333
335
|
else
|
334
|
-
raise "Tests do not currently support matching against $$type #{
|
336
|
+
raise "Tests do not currently support matching against $$type #{expected['$$type']}"
|
335
337
|
end
|
336
338
|
|
337
339
|
actual.is_a?(expected_class) || actual.key?(expected_key)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The MongoDB Ruby Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bson
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/mongo/collection/queryable_encryption.rb
|
118
118
|
- lib/mongo/collection/view.rb
|
119
119
|
- lib/mongo/collection/view/aggregation.rb
|
120
|
+
- lib/mongo/collection/view/aggregation/behavior.rb
|
120
121
|
- lib/mongo/collection/view/builder.rb
|
121
122
|
- lib/mongo/collection/view/builder/aggregation.rb
|
122
123
|
- lib/mongo/collection/view/builder/map_reduce.rb
|
@@ -172,8 +173,11 @@ files:
|
|
172
173
|
- lib/mongo/crypt/rewrap_many_data_key_context.rb
|
173
174
|
- lib/mongo/crypt/rewrap_many_data_key_result.rb
|
174
175
|
- lib/mongo/crypt/status.rb
|
176
|
+
- lib/mongo/csot_timeout_holder.rb
|
175
177
|
- lib/mongo/cursor.rb
|
176
178
|
- lib/mongo/cursor/kill_spec.rb
|
179
|
+
- lib/mongo/cursor/nontailable.rb
|
180
|
+
- lib/mongo/cursor_host.rb
|
177
181
|
- lib/mongo/database.rb
|
178
182
|
- lib/mongo/database/view.rb
|
179
183
|
- lib/mongo/dbref.rb
|
@@ -255,6 +259,7 @@ files:
|
|
255
259
|
- lib/mongo/error/server_api_not_supported.rb
|
256
260
|
- lib/mongo/error/server_certificate_revoked.rb
|
257
261
|
- lib/mongo/error/server_not_usable.rb
|
262
|
+
- lib/mongo/error/server_timeout_error.rb
|
258
263
|
- lib/mongo/error/session_ended.rb
|
259
264
|
- lib/mongo/error/session_not_materialized.rb
|
260
265
|
- lib/mongo/error/sessions_not_supported.rb
|
@@ -262,6 +267,7 @@ files:
|
|
262
267
|
- lib/mongo/error/snapshot_session_transaction_prohibited.rb
|
263
268
|
- lib/mongo/error/socket_error.rb
|
264
269
|
- lib/mongo/error/socket_timeout_error.rb
|
270
|
+
- lib/mongo/error/timeout_error.rb
|
265
271
|
- lib/mongo/error/transactions_not_supported.rb
|
266
272
|
- lib/mongo/error/unchangeable_collection_option.rb
|
267
273
|
- lib/mongo/error/unexpected_chunk_length.rb
|
@@ -419,6 +425,7 @@ files:
|
|
419
425
|
- lib/mongo/operation/shared/result/use_legacy_error_parser.rb
|
420
426
|
- lib/mongo/operation/shared/sessions_supported.rb
|
421
427
|
- lib/mongo/operation/shared/specifiable.rb
|
428
|
+
- lib/mongo/operation/shared/timed.rb
|
422
429
|
- lib/mongo/operation/shared/validatable.rb
|
423
430
|
- lib/mongo/operation/shared/write.rb
|
424
431
|
- lib/mongo/operation/shared/write_concern_supported.rb
|
@@ -477,7 +484,7 @@ files:
|
|
477
484
|
- lib/mongo/server/pending_connection.rb
|
478
485
|
- lib/mongo/server/push_monitor.rb
|
479
486
|
- lib/mongo/server/push_monitor/connection.rb
|
480
|
-
- lib/mongo/server/
|
487
|
+
- lib/mongo/server/round_trip_time_calculator.rb
|
481
488
|
- lib/mongo/server_selector.rb
|
482
489
|
- lib/mongo/server_selector/base.rb
|
483
490
|
- lib/mongo/server_selector/nearest.rb
|
@@ -566,6 +573,7 @@ files:
|
|
566
573
|
- spec/integration/client_side_encryption/rewrap_prose_spec.rb
|
567
574
|
- spec/integration/client_side_encryption/unique_index_on_key_alt_names_prose_spec.rb
|
568
575
|
- spec/integration/client_side_encryption/views_spec.rb
|
576
|
+
- spec/integration/client_side_operations_timeout/encryption_prose_spec.rb
|
569
577
|
- spec/integration/client_spec.rb
|
570
578
|
- spec/integration/client_update_spec.rb
|
571
579
|
- spec/integration/collection_indexes_prose_spec.rb
|
@@ -783,6 +791,7 @@ files:
|
|
783
791
|
- spec/mongo/operation/aggregate_spec.rb
|
784
792
|
- spec/mongo/operation/collections_info_spec.rb
|
785
793
|
- spec/mongo/operation/command_spec.rb
|
794
|
+
- spec/mongo/operation/context_spec.rb
|
786
795
|
- spec/mongo/operation/create/op_msg_spec.rb
|
787
796
|
- spec/mongo/operation/create_index_spec.rb
|
788
797
|
- spec/mongo/operation/create_user_spec.rb
|
@@ -792,6 +801,8 @@ files:
|
|
792
801
|
- spec/mongo/operation/drop_index_spec.rb
|
793
802
|
- spec/mongo/operation/find/builder/flags_spec.rb
|
794
803
|
- spec/mongo/operation/find/builder/modifiers_spec.rb
|
804
|
+
- spec/mongo/operation/find/op_msg_spec.rb
|
805
|
+
- spec/mongo/operation/get_more/op_msg_spec.rb
|
795
806
|
- spec/mongo/operation/indexes_spec.rb
|
796
807
|
- spec/mongo/operation/insert/bulk_spec.rb
|
797
808
|
- spec/mongo/operation/insert/op_msg_spec.rb
|
@@ -802,6 +813,7 @@ files:
|
|
802
813
|
- spec/mongo/operation/read_preference_op_msg_spec.rb
|
803
814
|
- spec/mongo/operation/remove_user_spec.rb
|
804
815
|
- spec/mongo/operation/result_spec.rb
|
816
|
+
- spec/mongo/operation/shared/csot/examples.rb
|
805
817
|
- spec/mongo/operation/specifiable_spec.rb
|
806
818
|
- spec/mongo/operation/update/bulk_spec.rb
|
807
819
|
- spec/mongo/operation/update/op_msg_spec.rb
|
@@ -836,7 +848,7 @@ files:
|
|
836
848
|
- spec/mongo/server/monitor/connection_spec.rb
|
837
849
|
- spec/mongo/server/monitor_spec.rb
|
838
850
|
- spec/mongo/server/push_monitor_spec.rb
|
839
|
-
- spec/mongo/server/
|
851
|
+
- spec/mongo/server/round_trip_time_calculator_spec.rb
|
840
852
|
- spec/mongo/server_selector/nearest_spec.rb
|
841
853
|
- spec/mongo/server_selector/primary_preferred_spec.rb
|
842
854
|
- spec/mongo/server_selector/primary_spec.rb
|
@@ -892,6 +904,7 @@ files:
|
|
892
904
|
- spec/runners/transactions/spec.rb
|
893
905
|
- spec/runners/transactions/test.rb
|
894
906
|
- spec/runners/unified.rb
|
907
|
+
- spec/runners/unified/ambiguous_operations.rb
|
895
908
|
- spec/runners/unified/assertions.rb
|
896
909
|
- spec/runners/unified/change_stream_operations.rb
|
897
910
|
- spec/runners/unified/client_side_encryption_operations.rb
|
@@ -913,6 +926,7 @@ files:
|
|
913
926
|
- spec/spec_tests/change_streams_unified_spec.rb
|
914
927
|
- spec/spec_tests/client_side_encryption_spec.rb
|
915
928
|
- spec/spec_tests/client_side_encryption_unified_spec.rb
|
929
|
+
- spec/spec_tests/client_side_operations_timeout_spec.rb
|
916
930
|
- spec/spec_tests/cmap_spec.rb
|
917
931
|
- spec/spec_tests/collection_management_spec.rb
|
918
932
|
- spec/spec_tests/command_monitoring_unified_spec.rb
|
@@ -961,49 +975,6 @@ files:
|
|
961
975
|
- spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml
|
962
976
|
- spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml
|
963
977
|
- spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml
|
964
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml
|
965
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml
|
966
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml
|
967
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml
|
968
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml
|
969
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml
|
970
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml
|
971
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml
|
972
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml
|
973
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml
|
974
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml
|
975
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml
|
976
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml
|
977
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml
|
978
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml
|
979
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml
|
980
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml
|
981
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml
|
982
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml
|
983
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml
|
984
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml
|
985
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml
|
986
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml
|
987
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml
|
988
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml
|
989
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml
|
990
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml
|
991
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml
|
992
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml
|
993
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml
|
994
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml
|
995
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml
|
996
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml
|
997
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml
|
998
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml
|
999
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml
|
1000
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml
|
1001
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml
|
1002
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml
|
1003
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml
|
1004
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml
|
1005
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml
|
1006
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml
|
1007
978
|
- spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml
|
1008
979
|
- spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml
|
1009
980
|
- spec/spec_tests/data/client_side_encryption/gcpKMS.yml
|
@@ -1017,6 +988,7 @@ files:
|
|
1017
988
|
- spec/spec_tests/data/client_side_encryption/missingKey.yml
|
1018
989
|
- spec/spec_tests/data/client_side_encryption/noSchema.yml
|
1019
990
|
- spec/spec_tests/data/client_side_encryption/replaceOne.yml
|
991
|
+
- spec/spec_tests/data/client_side_encryption/timeoutMS.yml
|
1020
992
|
- spec/spec_tests/data/client_side_encryption/types.yml
|
1021
993
|
- spec/spec_tests/data/client_side_encryption/unified/addKeyAltName.yml
|
1022
994
|
- spec/spec_tests/data/client_side_encryption/unified/createDataKey-kms_providers-invalid.yml
|
@@ -1033,6 +1005,31 @@ files:
|
|
1033
1005
|
- spec/spec_tests/data/client_side_encryption/updateMany.yml
|
1034
1006
|
- spec/spec_tests/data/client_side_encryption/updateOne.yml
|
1035
1007
|
- spec/spec_tests/data/client_side_encryption/validatorAndPartialFieldExpression.yml
|
1008
|
+
- spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml
|
1009
|
+
- spec/spec_tests/data/client_side_operations_timeout/change-streams.yml
|
1010
|
+
- spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml
|
1011
|
+
- spec/spec_tests/data/client_side_operations_timeout/command-execution.yml
|
1012
|
+
- spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml
|
1013
|
+
- spec/spec_tests/data/client_side_operations_timeout/cursors.yml
|
1014
|
+
- spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml
|
1015
|
+
- spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml
|
1016
|
+
- spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml
|
1017
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml
|
1018
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml
|
1019
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml
|
1020
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml
|
1021
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml
|
1022
|
+
- spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml
|
1023
|
+
- spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml
|
1024
|
+
- spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml
|
1025
|
+
- spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml
|
1026
|
+
- spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml
|
1027
|
+
- spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml
|
1028
|
+
- spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml
|
1029
|
+
- spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml
|
1030
|
+
- spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml
|
1031
|
+
- spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml
|
1032
|
+
- spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml
|
1036
1033
|
- spec/spec_tests/data/cmap/connection-must-have-id.yml
|
1037
1034
|
- spec/spec_tests/data/cmap/connection-must-order-ids.yml
|
1038
1035
|
- spec/spec_tests/data/cmap/pool-checkin-destroy-closed.yml
|
@@ -2000,6 +1997,7 @@ test_files:
|
|
2000
1997
|
- spec/integration/client_side_encryption/rewrap_prose_spec.rb
|
2001
1998
|
- spec/integration/client_side_encryption/unique_index_on_key_alt_names_prose_spec.rb
|
2002
1999
|
- spec/integration/client_side_encryption/views_spec.rb
|
2000
|
+
- spec/integration/client_side_operations_timeout/encryption_prose_spec.rb
|
2003
2001
|
- spec/integration/client_spec.rb
|
2004
2002
|
- spec/integration/client_update_spec.rb
|
2005
2003
|
- spec/integration/collection_indexes_prose_spec.rb
|
@@ -2217,6 +2215,7 @@ test_files:
|
|
2217
2215
|
- spec/mongo/operation/aggregate_spec.rb
|
2218
2216
|
- spec/mongo/operation/collections_info_spec.rb
|
2219
2217
|
- spec/mongo/operation/command_spec.rb
|
2218
|
+
- spec/mongo/operation/context_spec.rb
|
2220
2219
|
- spec/mongo/operation/create/op_msg_spec.rb
|
2221
2220
|
- spec/mongo/operation/create_index_spec.rb
|
2222
2221
|
- spec/mongo/operation/create_user_spec.rb
|
@@ -2226,6 +2225,8 @@ test_files:
|
|
2226
2225
|
- spec/mongo/operation/drop_index_spec.rb
|
2227
2226
|
- spec/mongo/operation/find/builder/flags_spec.rb
|
2228
2227
|
- spec/mongo/operation/find/builder/modifiers_spec.rb
|
2228
|
+
- spec/mongo/operation/find/op_msg_spec.rb
|
2229
|
+
- spec/mongo/operation/get_more/op_msg_spec.rb
|
2229
2230
|
- spec/mongo/operation/indexes_spec.rb
|
2230
2231
|
- spec/mongo/operation/insert/bulk_spec.rb
|
2231
2232
|
- spec/mongo/operation/insert/op_msg_spec.rb
|
@@ -2236,6 +2237,7 @@ test_files:
|
|
2236
2237
|
- spec/mongo/operation/read_preference_op_msg_spec.rb
|
2237
2238
|
- spec/mongo/operation/remove_user_spec.rb
|
2238
2239
|
- spec/mongo/operation/result_spec.rb
|
2240
|
+
- spec/mongo/operation/shared/csot/examples.rb
|
2239
2241
|
- spec/mongo/operation/specifiable_spec.rb
|
2240
2242
|
- spec/mongo/operation/update/bulk_spec.rb
|
2241
2243
|
- spec/mongo/operation/update/op_msg_spec.rb
|
@@ -2270,7 +2272,7 @@ test_files:
|
|
2270
2272
|
- spec/mongo/server/monitor/connection_spec.rb
|
2271
2273
|
- spec/mongo/server/monitor_spec.rb
|
2272
2274
|
- spec/mongo/server/push_monitor_spec.rb
|
2273
|
-
- spec/mongo/server/
|
2275
|
+
- spec/mongo/server/round_trip_time_calculator_spec.rb
|
2274
2276
|
- spec/mongo/server_selector/nearest_spec.rb
|
2275
2277
|
- spec/mongo/server_selector/primary_preferred_spec.rb
|
2276
2278
|
- spec/mongo/server_selector/primary_spec.rb
|
@@ -2325,6 +2327,7 @@ test_files:
|
|
2325
2327
|
- spec/runners/transactions/spec.rb
|
2326
2328
|
- spec/runners/transactions/test.rb
|
2327
2329
|
- spec/runners/transactions.rb
|
2330
|
+
- spec/runners/unified/ambiguous_operations.rb
|
2328
2331
|
- spec/runners/unified/assertions.rb
|
2329
2332
|
- spec/runners/unified/change_stream_operations.rb
|
2330
2333
|
- spec/runners/unified/client_side_encryption_operations.rb
|
@@ -2347,6 +2350,7 @@ test_files:
|
|
2347
2350
|
- spec/spec_tests/change_streams_unified_spec.rb
|
2348
2351
|
- spec/spec_tests/client_side_encryption_spec.rb
|
2349
2352
|
- spec/spec_tests/client_side_encryption_unified_spec.rb
|
2353
|
+
- spec/spec_tests/client_side_operations_timeout_spec.rb
|
2350
2354
|
- spec/spec_tests/cmap_spec.rb
|
2351
2355
|
- spec/spec_tests/collection_management_spec.rb
|
2352
2356
|
- spec/spec_tests/command_monitoring_unified_spec.rb
|
@@ -2395,49 +2399,6 @@ test_files:
|
|
2395
2399
|
- spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml
|
2396
2400
|
- spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml
|
2397
2401
|
- spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml
|
2398
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml
|
2399
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml
|
2400
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml
|
2401
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml
|
2402
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml
|
2403
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml
|
2404
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml
|
2405
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml
|
2406
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml
|
2407
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml
|
2408
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml
|
2409
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml
|
2410
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml
|
2411
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml
|
2412
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml
|
2413
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml
|
2414
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml
|
2415
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml
|
2416
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml
|
2417
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml
|
2418
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml
|
2419
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml
|
2420
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml
|
2421
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml
|
2422
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml
|
2423
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml
|
2424
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml
|
2425
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml
|
2426
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml
|
2427
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml
|
2428
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml
|
2429
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml
|
2430
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml
|
2431
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml
|
2432
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml
|
2433
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml
|
2434
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml
|
2435
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml
|
2436
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml
|
2437
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml
|
2438
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml
|
2439
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml
|
2440
|
-
- spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml
|
2441
2402
|
- spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml
|
2442
2403
|
- spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml
|
2443
2404
|
- spec/spec_tests/data/client_side_encryption/gcpKMS.yml
|
@@ -2451,6 +2412,7 @@ test_files:
|
|
2451
2412
|
- spec/spec_tests/data/client_side_encryption/missingKey.yml
|
2452
2413
|
- spec/spec_tests/data/client_side_encryption/noSchema.yml
|
2453
2414
|
- spec/spec_tests/data/client_side_encryption/replaceOne.yml
|
2415
|
+
- spec/spec_tests/data/client_side_encryption/timeoutMS.yml
|
2454
2416
|
- spec/spec_tests/data/client_side_encryption/types.yml
|
2455
2417
|
- spec/spec_tests/data/client_side_encryption/unified/addKeyAltName.yml
|
2456
2418
|
- spec/spec_tests/data/client_side_encryption/unified/createDataKey-kms_providers-invalid.yml
|
@@ -2467,6 +2429,31 @@ test_files:
|
|
2467
2429
|
- spec/spec_tests/data/client_side_encryption/updateMany.yml
|
2468
2430
|
- spec/spec_tests/data/client_side_encryption/updateOne.yml
|
2469
2431
|
- spec/spec_tests/data/client_side_encryption/validatorAndPartialFieldExpression.yml
|
2432
|
+
- spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml
|
2433
|
+
- spec/spec_tests/data/client_side_operations_timeout/change-streams.yml
|
2434
|
+
- spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml
|
2435
|
+
- spec/spec_tests/data/client_side_operations_timeout/command-execution.yml
|
2436
|
+
- spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml
|
2437
|
+
- spec/spec_tests/data/client_side_operations_timeout/cursors.yml
|
2438
|
+
- spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml
|
2439
|
+
- spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml
|
2440
|
+
- spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml
|
2441
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml
|
2442
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml
|
2443
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml
|
2444
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml
|
2445
|
+
- spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml
|
2446
|
+
- spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml
|
2447
|
+
- spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml
|
2448
|
+
- spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml
|
2449
|
+
- spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml
|
2450
|
+
- spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml
|
2451
|
+
- spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml
|
2452
|
+
- spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml
|
2453
|
+
- spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml
|
2454
|
+
- spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml
|
2455
|
+
- spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml
|
2456
|
+
- spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml
|
2470
2457
|
- spec/spec_tests/data/cmap/connection-must-have-id.yml
|
2471
2458
|
- spec/spec_tests/data/cmap/connection-must-order-ids.yml
|
2472
2459
|
- spec/spec_tests/data/cmap/pool-checkin-destroy-closed.yml
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# rubocop:todo all
|
3
|
-
|
4
|
-
require 'spec_helper'
|
5
|
-
|
6
|
-
describe Mongo::Server::RoundTripTimeAverager do
|
7
|
-
let(:averager) { Mongo::Server::RoundTripTimeAverager.new }
|
8
|
-
|
9
|
-
describe '#update_average_round_trip_time' do
|
10
|
-
context 'no existing average rtt' do
|
11
|
-
it 'updates average rtt' do
|
12
|
-
averager.instance_variable_set('@last_round_trip_time', 5)
|
13
|
-
averager.send(:update_average_round_trip_time)
|
14
|
-
expect(averager.average_round_trip_time).to eq(5)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
context 'with existing average rtt' do
|
19
|
-
it 'averages with existing average rtt' do
|
20
|
-
averager.instance_variable_set('@last_round_trip_time', 5)
|
21
|
-
averager.instance_variable_set('@average_round_trip_time', 10)
|
22
|
-
averager.send(:update_average_round_trip_time)
|
23
|
-
expect(averager.average_round_trip_time).to eq(9)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
describe '#measure' do
|
29
|
-
context 'block does not raise' do
|
30
|
-
it 'updates average rtt' do
|
31
|
-
expect(averager).to receive(:update_average_round_trip_time)
|
32
|
-
averager.measure do
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
context 'block raises' do
|
38
|
-
it 'does not update average rtt' do
|
39
|
-
expect(averager).not_to receive(:update_average_round_trip_time)
|
40
|
-
lambda do
|
41
|
-
averager.measure do
|
42
|
-
raise "Problem"
|
43
|
-
end
|
44
|
-
end.should raise_error(/Problem/)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|