Skip to content

Commit ff0457e

Browse files
committed
Skip tests with 2.0 relying on profiling info until SERVER-4754 is fixed
1 parent 11b18be commit ff0457e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/helpers/test_unit.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,13 @@ def with_write_commands_and_operations(client, &block)
306306
def batch_commands?(wire_version)
307307
wire_version >= Mongo::MongoClient::BATCH_COMMANDS
308308
end
309+
310+
def subject_to_server_4754?(client)
311+
# Until SERVER-4754 is resolved, profiling info is not collected
312+
# when mongod is started with --auth in versions < 2.2
313+
cmd_line_args = client['admin'].command({ :getCmdLineOpts => 1 })['parsed']
314+
client.server_version < '2.2' && cmd_line_args.include?('auth')
315+
end
309316
end
310317

311318
# Before and after hooks for the entire test run

test/replica_set/cursor_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def route_query(read)
132132
# batch from send_initial_query is 101 documents
133133
# check that you get n_docs back from the query, with the same port
134134
def cursor_get_more_test(read=:primary)
135+
return if subject_to_server_4754?(@client)
135136
set_read_client_and_tag(read)
136137
10.times do
137138
# assert that the query went to the correct member
@@ -152,6 +153,7 @@ def cursor_get_more_test(read=:primary)
152153

153154
# batch from get_more can be huge, so close after send_initial_query
154155
def kill_cursor_test(read=:primary)
156+
return if subject_to_server_4754?(@client)
155157
set_read_client_and_tag(read)
156158
10.times do
157159
# assert that the query went to the correct member
@@ -171,6 +173,7 @@ def kill_cursor_test(read=:primary)
171173
end
172174

173175
def assert_cursors_on_members(read=:primary)
176+
return if subject_to_server_4754?(@client)
174177
set_read_client_and_tag(read)
175178
# assert that the query went to the correct member
176179
route_query(read)

0 commit comments

Comments
 (0)