mongo 2.17.0 → 2.17.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/mongo/bulk_write.rb +1 -1
- data/lib/mongo/cluster/reapers/cursor_reaper.rb +26 -14
- data/lib/mongo/collection/view/builder/map_reduce.rb +7 -4
- data/lib/mongo/collection/view/iterable.rb +2 -1
- data/lib/mongo/collection/view/map_reduce.rb +14 -1
- data/lib/mongo/cursor/kill_spec.rb +19 -2
- data/lib/mongo/cursor.rb +11 -6
- data/lib/mongo/operation/shared/sessions_supported.rb +7 -3
- data/lib/mongo/query_cache.rb +12 -2
- data/lib/mongo/server/monitor/connection.rb +10 -4
- data/lib/mongo/version.rb +1 -1
- data/spec/integration/bulk_write_spec.rb +16 -0
- data/spec/integration/query_cache_spec.rb +159 -0
- data/spec/integration/sdam_events_spec.rb +40 -0
- data/spec/lite_spec_helper.rb +7 -0
- data/spec/mongo/cluster/cursor_reaper_spec.rb +22 -15
- data/spec/mongo/collection/view/map_reduce_spec.rb +16 -0
- data/spec/mongo/collection/view/readable_spec.rb +56 -0
- data/spec/mongo/cursor_spec.rb +53 -2
- data/spec/mongo/query_cache_spec.rb +165 -0
- data/spec/runners/auth.rb +1 -1
- data/spec/runners/change_streams/spec.rb +1 -1
- data/spec/runners/cmap.rb +1 -1
- data/spec/runners/command_monitoring.rb +1 -1
- data/spec/runners/connection_string.rb +1 -1
- data/spec/runners/crud/spec.rb +1 -3
- data/spec/runners/gridfs.rb +1 -1
- data/spec/runners/read_write_concern_document.rb +1 -1
- data/spec/runners/sdam.rb +1 -1
- data/spec/runners/server_selection.rb +1 -1
- data/spec/runners/server_selection_rtt.rb +1 -1
- data/spec/runners/unified/test_group.rb +1 -1
- data/spec/shared/share/Dockerfile.erb +3 -3
- data/spec/shared/shlib/server.sh +1 -1
- data/spec/spec_tests/seed_list_discovery_spec.rb +1 -1
- data/spec/support/certificates/atlas-ocsp-ca.crt +40 -47
- data/spec/support/certificates/atlas-ocsp.crt +101 -106
- data/spec/support/utils.rb +31 -0
- data.tar.gz.sig +2 -2
- metadata +1056 -1055
- metadata.gz.sig +1 -2
@@ -41,12 +41,12 @@ describe Mongo::Cluster::CursorReaper do
|
|
41
41
|
let(:cursor_id) { 1 }
|
42
42
|
let(:cursor_kill_spec_1) do
|
43
43
|
Mongo::Cursor::KillSpec.new(
|
44
|
-
cursor_id: cursor_id, coll_name: 'c', db_name: 'd', service_id: nil,
|
44
|
+
cursor_id: cursor_id, coll_name: 'c', db_name: 'd', service_id: nil, server_address: address
|
45
45
|
)
|
46
46
|
end
|
47
47
|
let(:cursor_kill_spec_2) do
|
48
48
|
Mongo::Cursor::KillSpec.new(
|
49
|
-
cursor_id: cursor_id, coll_name: 'c', db_name: 'q', service_id: nil,
|
49
|
+
cursor_id: cursor_id, coll_name: 'c', db_name: 'q', service_id: nil, server_address: address
|
50
50
|
)
|
51
51
|
end
|
52
52
|
let(:to_kill) { reaper.instance_variable_get(:@to_kill)}
|
@@ -60,36 +60,40 @@ describe Mongo::Cluster::CursorReaper do
|
|
60
60
|
context 'when there is not a list already for the server' do
|
61
61
|
|
62
62
|
before do
|
63
|
-
reaper.schedule_kill_cursor(cursor_kill_spec_1
|
63
|
+
reaper.schedule_kill_cursor(cursor_kill_spec_1)
|
64
|
+
reaper.read_scheduled_kill_specs
|
64
65
|
end
|
65
66
|
|
66
67
|
it 'initializes the list of op specs to a set' do
|
67
|
-
expect(to_kill.keys).to eq([ address
|
68
|
-
expect(to_kill[address
|
68
|
+
expect(to_kill.keys).to eq([ address ])
|
69
|
+
expect(to_kill[address]).to contain_exactly(cursor_kill_spec_1)
|
69
70
|
end
|
70
71
|
end
|
71
72
|
|
72
73
|
context 'when there is a list of ops already for the server' do
|
73
74
|
|
74
75
|
before do
|
75
|
-
reaper.schedule_kill_cursor(cursor_kill_spec_1
|
76
|
-
reaper.
|
76
|
+
reaper.schedule_kill_cursor(cursor_kill_spec_1)
|
77
|
+
reaper.read_scheduled_kill_specs
|
78
|
+
reaper.schedule_kill_cursor(cursor_kill_spec_2)
|
79
|
+
reaper.read_scheduled_kill_specs
|
77
80
|
end
|
78
81
|
|
79
82
|
it 'adds the op to the server list' do
|
80
|
-
expect(to_kill.keys).to eq([ address
|
81
|
-
expect(to_kill[address
|
83
|
+
expect(to_kill.keys).to eq([ address ])
|
84
|
+
expect(to_kill[address]).to contain_exactly(cursor_kill_spec_1, cursor_kill_spec_2)
|
82
85
|
end
|
83
86
|
|
84
87
|
context 'when the same op is added more than once' do
|
85
88
|
|
86
89
|
before do
|
87
|
-
reaper.schedule_kill_cursor(cursor_kill_spec_2
|
90
|
+
reaper.schedule_kill_cursor(cursor_kill_spec_2)
|
91
|
+
reaper.read_scheduled_kill_specs
|
88
92
|
end
|
89
93
|
|
90
94
|
it 'does not allow duplicates ops for a server' do
|
91
|
-
expect(to_kill.keys).to eq([ address
|
92
|
-
expect(to_kill[address
|
95
|
+
expect(to_kill.keys).to eq([ address ])
|
96
|
+
expect(to_kill[address]).to contain_exactly(cursor_kill_spec_1, cursor_kill_spec_2)
|
93
97
|
end
|
94
98
|
end
|
95
99
|
end
|
@@ -98,7 +102,7 @@ describe Mongo::Cluster::CursorReaper do
|
|
98
102
|
context 'when the cursor is not on the list of active cursors' do
|
99
103
|
|
100
104
|
before do
|
101
|
-
reaper.schedule_kill_cursor(cursor_kill_spec_1
|
105
|
+
reaper.schedule_kill_cursor(cursor_kill_spec_1)
|
102
106
|
end
|
103
107
|
|
104
108
|
it 'does not add the kill cursors op spec to the list' do
|
@@ -189,8 +193,11 @@ describe Mongo::Cluster::CursorReaper do
|
|
189
193
|
around do |example|
|
190
194
|
authorized_collection.insert_many(docs)
|
191
195
|
periodic_executor.stop!
|
192
|
-
cluster.schedule_kill_cursor(
|
193
|
-
|
196
|
+
cluster.schedule_kill_cursor(
|
197
|
+
cursor.kill_spec(
|
198
|
+
cursor.instance_variable_get(:@server)
|
199
|
+
)
|
200
|
+
)
|
194
201
|
periodic_executor.flush
|
195
202
|
example.run
|
196
203
|
periodic_executor.run!
|
@@ -878,4 +878,20 @@ describe Mongo::Collection::View::MapReduce do
|
|
878
878
|
end
|
879
879
|
end
|
880
880
|
end
|
881
|
+
|
882
|
+
describe '#map_reduce_spec' do
|
883
|
+
context 'when read preference is given' do
|
884
|
+
let(:view_options) do
|
885
|
+
{ read: {mode: :secondary} }
|
886
|
+
end
|
887
|
+
|
888
|
+
context 'selector' do
|
889
|
+
# For compatibility with released versions of Mongoid, this method
|
890
|
+
# must return read preference under the :read key.
|
891
|
+
it 'contains read preference' do
|
892
|
+
map_reduce_spec[:selector][:read].should == {'mode' => :secondary}
|
893
|
+
end
|
894
|
+
end
|
895
|
+
end
|
896
|
+
end
|
881
897
|
end
|
@@ -1186,6 +1186,62 @@ describe Mongo::Collection::View::Readable do
|
|
1186
1186
|
it 'returns a new View' do
|
1187
1187
|
expect(new_view).not_to be(view)
|
1188
1188
|
end
|
1189
|
+
|
1190
|
+
context 'when sending to server' do
|
1191
|
+
let(:subscriber) { Mrss::EventSubscriber.new }
|
1192
|
+
|
1193
|
+
before do
|
1194
|
+
authorized_collection.client.subscribe(Mongo::Monitoring::COMMAND, subscriber)
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
let(:event) do
|
1198
|
+
subscriber.single_command_started_event('find')
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
it 'is sent to server' do
|
1202
|
+
new_view.to_a
|
1203
|
+
event.command.slice('noCursorTimeout').should == {'noCursorTimeout' => true}
|
1204
|
+
end
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
context 'integration test' do
|
1208
|
+
require_topology :single
|
1209
|
+
|
1210
|
+
# The number of open cursors with the option set to prevent timeout.
|
1211
|
+
def current_no_timeout_count
|
1212
|
+
root_authorized_client
|
1213
|
+
.command(serverStatus: 1)
|
1214
|
+
.documents
|
1215
|
+
.first
|
1216
|
+
.fetch('metrics')
|
1217
|
+
.fetch('cursor')
|
1218
|
+
.fetch('open')
|
1219
|
+
.fetch('noTimeout')
|
1220
|
+
end
|
1221
|
+
|
1222
|
+
it 'is applied on the server' do
|
1223
|
+
# Initialize collection with two documents.
|
1224
|
+
new_view.collection.insert_many([{}, {}])
|
1225
|
+
|
1226
|
+
expect(new_view.count).to be == 2
|
1227
|
+
|
1228
|
+
# Initial "noTimeout" count should be zero.
|
1229
|
+
states = [current_no_timeout_count]
|
1230
|
+
|
1231
|
+
# The "noTimeout" count should be one while iterating.
|
1232
|
+
new_view.batch_size(1).each { states << current_no_timeout_count }
|
1233
|
+
|
1234
|
+
# Final "noTimeout" count should be back to zero.
|
1235
|
+
states << current_no_timeout_count
|
1236
|
+
|
1237
|
+
# This succeeds on:
|
1238
|
+
# commit aab776ebdfb15ddb9765039f7300e15796de0c5c
|
1239
|
+
#
|
1240
|
+
# This starts failing with [0, 0, 0, 0] from:
|
1241
|
+
# commit 2d9f0217ec904a1952a1ada2136502eefbca562e
|
1242
|
+
expect(states).to be == [0, 1, 1, 0]
|
1243
|
+
end
|
1244
|
+
end
|
1189
1245
|
end
|
1190
1246
|
|
1191
1247
|
describe '#projection' do
|
data/spec/mongo/cursor_spec.rb
CHANGED
@@ -331,8 +331,9 @@ describe Mongo::Cursor do
|
|
331
331
|
|
332
332
|
before do
|
333
333
|
authorized_collection.insert_many(documents)
|
334
|
-
cluster.schedule_kill_cursor(
|
335
|
-
|
334
|
+
cluster.schedule_kill_cursor(
|
335
|
+
cursor.kill_spec(cursor.instance_variable_get(:@server))
|
336
|
+
)
|
336
337
|
end
|
337
338
|
|
338
339
|
let(:view) do
|
@@ -697,4 +698,54 @@ describe Mongo::Cursor do
|
|
697
698
|
end
|
698
699
|
end
|
699
700
|
end
|
701
|
+
|
702
|
+
describe '#batch_size' do
|
703
|
+
let(:subscriber) { Mrss::EventSubscriber.new }
|
704
|
+
|
705
|
+
let(:subscribed_client) do
|
706
|
+
authorized_client.tap do |client|
|
707
|
+
client.subscribe(Mongo::Monitoring::COMMAND, subscriber)
|
708
|
+
end
|
709
|
+
end
|
710
|
+
|
711
|
+
let(:collection) do
|
712
|
+
subscribed_client[TEST_COLL]
|
713
|
+
end
|
714
|
+
|
715
|
+
let(:view) do
|
716
|
+
collection.find({}, limit: limit)
|
717
|
+
end
|
718
|
+
|
719
|
+
before do
|
720
|
+
collection.drop
|
721
|
+
collection.insert_many([].fill({ "bar": "baz" }, 0, 102))
|
722
|
+
end
|
723
|
+
|
724
|
+
context 'when limit is 0 and batch_size is not set' do
|
725
|
+
let(:limit) do
|
726
|
+
0
|
727
|
+
end
|
728
|
+
|
729
|
+
it 'does not set batch_size' do
|
730
|
+
view.to_a
|
731
|
+
get_more_commands = subscriber.started_events.select { |e| e.command_name == 'getMore' }
|
732
|
+
expect(get_more_commands.length).to eq(1)
|
733
|
+
expect(get_more_commands.first.command.keys).not_to include('batchSize')
|
734
|
+
end
|
735
|
+
end
|
736
|
+
|
737
|
+
context 'when limit is not zero and batch_size is not set' do
|
738
|
+
let(:limit) do
|
739
|
+
1000
|
740
|
+
end
|
741
|
+
|
742
|
+
it 'sets batch_size' do
|
743
|
+
view.to_a
|
744
|
+
get_more_commands = subscriber.started_events.select { |e| e.command_name == 'getMore' }
|
745
|
+
|
746
|
+
expect(get_more_commands.length).to eq(1)
|
747
|
+
expect(get_more_commands.first.command.keys).to include('batchSize')
|
748
|
+
end
|
749
|
+
end
|
750
|
+
end
|
700
751
|
end
|
@@ -191,6 +191,14 @@ describe Mongo::QueryCache do
|
|
191
191
|
end
|
192
192
|
end
|
193
193
|
|
194
|
+
context 'when the query has a limit but negative' do
|
195
|
+
let(:limit) { -5 }
|
196
|
+
|
197
|
+
it 'returns the caching cursor' do
|
198
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
194
202
|
context 'when the query has no limit' do
|
195
203
|
let(:limit) { nil }
|
196
204
|
|
@@ -198,6 +206,65 @@ describe Mongo::QueryCache do
|
|
198
206
|
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
199
207
|
end
|
200
208
|
end
|
209
|
+
|
210
|
+
context 'when the query has a 0 limit' do
|
211
|
+
let(:limit) { 0 }
|
212
|
+
|
213
|
+
it 'returns the caching cursor' do
|
214
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
context 'when that entry has a 0 limit' do
|
220
|
+
let(:caching_cursor_options) do
|
221
|
+
{
|
222
|
+
namespace: 'db.coll',
|
223
|
+
selector: { field: 'value' },
|
224
|
+
limit: 0,
|
225
|
+
}
|
226
|
+
end
|
227
|
+
|
228
|
+
let(:query_options) do
|
229
|
+
caching_cursor_options.merge(limit: limit)
|
230
|
+
end
|
231
|
+
|
232
|
+
before do
|
233
|
+
allow(view).to receive(:limit) { 0 }
|
234
|
+
end
|
235
|
+
|
236
|
+
context 'when the query has a limit' do
|
237
|
+
let(:limit) { 5 }
|
238
|
+
|
239
|
+
it 'returns the caching cursor' do
|
240
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
context 'when the query has a limit but negative' do
|
245
|
+
let(:limit) { -5 }
|
246
|
+
|
247
|
+
it 'returns the caching cursor' do
|
248
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
|
253
|
+
context 'when the query has no limit' do
|
254
|
+
let(:limit) { nil }
|
255
|
+
|
256
|
+
it 'returns the caching cursor' do
|
257
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
context 'when the query has a 0 limit' do
|
262
|
+
let(:limit) { 0 }
|
263
|
+
|
264
|
+
it 'returns the caching cursor' do
|
265
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
266
|
+
end
|
267
|
+
end
|
201
268
|
end
|
202
269
|
|
203
270
|
context 'when that entry has a limit' do
|
@@ -225,6 +292,14 @@ describe Mongo::QueryCache do
|
|
225
292
|
end
|
226
293
|
end
|
227
294
|
|
295
|
+
context 'and the new query has a smaller limit but negative' do
|
296
|
+
let(:limit) { -4 }
|
297
|
+
|
298
|
+
it 'returns the caching cursor' do
|
299
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
228
303
|
context 'and the new query has a larger limit' do
|
229
304
|
let(:limit) { 6 }
|
230
305
|
|
@@ -233,6 +308,14 @@ describe Mongo::QueryCache do
|
|
233
308
|
end
|
234
309
|
end
|
235
310
|
|
311
|
+
context 'and the new query has a larger limit but negative' do
|
312
|
+
let(:limit) { -6 }
|
313
|
+
|
314
|
+
it 'returns nil' do
|
315
|
+
expect(Mongo::QueryCache.get(**query_options)).to be_nil
|
316
|
+
end
|
317
|
+
end
|
318
|
+
|
236
319
|
context 'and the new query has the same limit' do
|
237
320
|
let(:limit) { 5 }
|
238
321
|
|
@@ -241,6 +324,80 @@ describe Mongo::QueryCache do
|
|
241
324
|
end
|
242
325
|
end
|
243
326
|
|
327
|
+
context 'and the new query has the same limit but negative' do
|
328
|
+
let(:limit) { -5 }
|
329
|
+
|
330
|
+
it 'returns the caching cursor' do
|
331
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
335
|
+
context 'and the new query has no limit' do
|
336
|
+
let(:limit) { nil }
|
337
|
+
|
338
|
+
it 'returns nil' do
|
339
|
+
expect(Mongo::QueryCache.get(**query_options)).to be_nil
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
context 'and the new query has a 0 limit' do
|
344
|
+
let(:limit) { 0 }
|
345
|
+
|
346
|
+
it 'returns nil' do
|
347
|
+
expect(Mongo::QueryCache.get(**query_options)).to be_nil
|
348
|
+
end
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
context 'when that entry has a negative limit' do
|
353
|
+
let(:caching_cursor_options) do
|
354
|
+
{
|
355
|
+
namespace: 'db.coll',
|
356
|
+
selector: { field: 'value' },
|
357
|
+
limit: -5,
|
358
|
+
}
|
359
|
+
end
|
360
|
+
|
361
|
+
let(:query_options) do
|
362
|
+
caching_cursor_options.merge(limit: limit)
|
363
|
+
end
|
364
|
+
|
365
|
+
before do
|
366
|
+
allow(view).to receive(:limit) { -5 }
|
367
|
+
end
|
368
|
+
|
369
|
+
context 'and the new query has a smaller limit' do
|
370
|
+
let(:limit) { 4 }
|
371
|
+
|
372
|
+
it 'returns the caching cursor' do
|
373
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
context 'and the new query has a larger limit' do
|
378
|
+
let(:limit) { 6 }
|
379
|
+
|
380
|
+
it 'returns nil' do
|
381
|
+
expect(Mongo::QueryCache.get(**query_options)).to be_nil
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
context 'and the new query has the same negative limit' do
|
386
|
+
let(:limit) { -5 }
|
387
|
+
|
388
|
+
it 'returns the caching cursor' do
|
389
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
context 'and the new query has the same positive limit' do
|
394
|
+
let(:limit) { 5 }
|
395
|
+
|
396
|
+
it 'returns the caching cursor' do
|
397
|
+
expect(Mongo::QueryCache.get(**query_options)).to eq(caching_cursor)
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
244
401
|
context 'and the new query has no limit' do
|
245
402
|
let(:limit) { nil }
|
246
403
|
|
@@ -248,6 +405,14 @@ describe Mongo::QueryCache do
|
|
248
405
|
expect(Mongo::QueryCache.get(**query_options)).to be_nil
|
249
406
|
end
|
250
407
|
end
|
408
|
+
|
409
|
+
context 'and the new query has a 0 limit' do
|
410
|
+
let(:limit) { 0 }
|
411
|
+
|
412
|
+
it 'returns nil' do
|
413
|
+
expect(Mongo::QueryCache.get(**query_options)).to be_nil
|
414
|
+
end
|
415
|
+
end
|
251
416
|
end
|
252
417
|
end
|
253
418
|
end
|
data/spec/runners/auth.rb
CHANGED
@@ -32,7 +32,7 @@ module Mongo
|
|
32
32
|
#
|
33
33
|
# @since 2.6.0
|
34
34
|
def initialize(test_path)
|
35
|
-
@spec =
|
35
|
+
@spec = ::Utils.load_spec_yaml_file(test_path)
|
36
36
|
@description = File.basename(test_path)
|
37
37
|
@spec_tests = @spec['tests']
|
38
38
|
@collection_name = @spec['collection_name']
|
data/spec/runners/cmap.rb
CHANGED
@@ -40,7 +40,7 @@ module Mongo
|
|
40
40
|
#
|
41
41
|
# @param [ String ] test_path The path to the file.
|
42
42
|
def initialize(test_path)
|
43
|
-
@test =
|
43
|
+
@test = ::Utils.load_spec_yaml_file(test_path)
|
44
44
|
|
45
45
|
@description = @test['description']
|
46
46
|
@pool_options = ::Utils.snakeize_hash(process_options(@test['poolOptions']))
|
data/spec/runners/crud/spec.rb
CHANGED
@@ -12,9 +12,7 @@ module Mongo
|
|
12
12
|
#
|
13
13
|
# @since 2.0.0
|
14
14
|
def initialize(test_path)
|
15
|
-
|
16
|
-
|
17
|
-
@spec = YAML.load(contents)
|
15
|
+
@spec = ::Utils.load_spec_yaml_file(test_path)
|
18
16
|
@description = File.basename(test_path)
|
19
17
|
@data = BSON::ExtJSON.parse_obj(@spec['data'])
|
20
18
|
@tests = @spec['tests']
|
data/spec/runners/gridfs.rb
CHANGED
data/spec/runners/sdam.rb
CHANGED
@@ -64,7 +64,7 @@ module Mongo
|
|
64
64
|
#
|
65
65
|
# @since 2.0.0
|
66
66
|
def initialize(test_path)
|
67
|
-
@test =
|
67
|
+
@test = ::Utils.load_spec_yaml_file(test_path)
|
68
68
|
@description = "#{@test['topology_description']['type']}: #{File.basename(test_path)}"
|
69
69
|
@heartbeat_frequency = @test['heartbeatFrequencyMS'] / 1000 if @test['heartbeatFrequencyMS']
|
70
70
|
@read_preference = @test['read_preference']
|
@@ -28,7 +28,7 @@ module Mongo
|
|
28
28
|
#
|
29
29
|
# @since 2.0.0
|
30
30
|
def initialize(test_path)
|
31
|
-
@test =
|
31
|
+
@test = ::Utils.load_spec_yaml_file(test_path)
|
32
32
|
@description = "#{File.basename(test_path)}: avg_rtt_ms: #{@test['avg_rtt_ms']}, new_rtt_ms: #{@test['new_rtt_ms']}," +
|
33
33
|
" new_avg_rtt: #{@test['new_avg_rtt']}"
|
34
34
|
@average_rtt = @test['avg_rtt_ms'] == 'NULL' ? nil : @test['avg_rtt_ms'].to_f / 1000
|
@@ -233,13 +233,13 @@ CFG
|
|
233
233
|
# Current virtualenv fails with
|
234
234
|
# https://github.com/pypa/virtualenv/issues/1630
|
235
235
|
<% if distro =~ /ubuntu2004/ %>
|
236
|
-
RUN python3 -m pip install 'virtualenv<20' 'mtools-legacy[mlaunch]'
|
236
|
+
RUN python3 -m pip install 'virtualenv<20' 'mtools-legacy[mlaunch]==1.5.5'
|
237
237
|
<% else %>
|
238
|
-
RUN python2 -m pip install 'virtualenv<20' 'mtools-legacy[mlaunch]'
|
238
|
+
RUN python2 -m pip install 'virtualenv<20' 'mtools-legacy[mlaunch]==1.5.5'
|
239
239
|
<% end %>
|
240
240
|
|
241
241
|
RUN pip --version && \
|
242
|
-
pip install mtools-legacy[mlaunch]
|
242
|
+
pip install 'mtools-legacy[mlaunch]==1.5.5'
|
243
243
|
|
244
244
|
<% if @env.fetch('MONGODB_VERSION') >= '4.4' %>
|
245
245
|
# ubuntu1604 installs MarkupSafe 0.0.0 here instead of 2.0.0+
|
data/spec/shared/shlib/server.sh
CHANGED