Skip to content

Commit fab2003

Browse files
RUBY-2764 Remove modifiers from cmd monitor spec (#2345)
1 parent 6f59d9a commit fab2003

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

spec/runners/crud/operation.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,11 @@ def options
376376
arguments.merge(arguments['options'] || {}).each do |spec_k, v|
377377
ruby_k = ::Utils.underscore(spec_k).to_sym
378378

379-
if v.is_a?(Hash) && v['$numberLong']
380-
v = v['$numberLong'].to_i
381-
end
379+
ruby_k = {
380+
min: :min_value,
381+
max: :max_value,
382+
show_record_id: :show_disk_loc
383+
}[ruby_k] || ruby_k
382384

383385
if respond_to?("transform_#{ruby_k}", true)
384386
v = send("transform_#{ruby_k}", v)

spec/spec_tests/data/command_monitoring/find.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@ tests:
4343
filter: { _id: { $gt: 1 } }
4444
sort: { _id: 1 }
4545
skip: {"$numberLong": "2"}
46-
modifiers:
47-
$comment: "test"
48-
$hint: { _id: 1 }
49-
$max: { _id: 6 }
50-
$maxTimeMS: 6000
51-
$min: { _id: 0 }
52-
$returnKey: false
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
5453
expectations:
5554
-
5655
command_started_event:
@@ -195,8 +194,9 @@ tests:
195194
- { $numberLong: "42" }
196195
command_name: "killCursors"
197196
-
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)"
199198
ignore_if_server_version_less_than: "3.1"
199+
ignore_if_server_version_greater_than: "4.4"
200200
ignore_if_topology_type:
201201
- "sharded"
202202
operation:

0 commit comments

Comments
 (0)