Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Possible test for RUBY-545 #157

Closed
wants to merge 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 2 deletions.
  1. +7 −2 test/replica_set/cursor_test.rb
View
9 test/replica_set/cursor_test.rb
@@ -16,6 +16,11 @@ def test_cursors_get_closed_secondary
assert_cursor_count
end
+ def test_cusors_get_closed_secondary_query
+ setup_client
+ assert_cursor_count(:secondary)
+ end
+
private
def setup_client(read=:primary)
@@ -46,12 +51,12 @@ def query_count(client)
client['admin'].command({:serverStatus => 1})['opcounters']['query']
end
- def assert_cursor_count
+ def assert_cursor_count(read=:primary)
before_primary_cursor = cursor_count(@primary)
before_read_cursor = cursor_count(@read)
before_read_query = query_count(@read)
- @coll.find.limit(2).to_a
+ @coll.find({}, :read => read).limit(2).to_a
after_primary_cursor = cursor_count(@primary)
after_read_cursor = cursor_count(@read)
Something went wrong with that request. Please try again.