minor: read preference test fix

Secondary to remove is randomly chosen so test would randomly fail
before this fix.
This commit is contained in:
Tyler Brock 2012-06-01 16:34:04 -04:00
parent 4df2564519
commit 351eeb65a2
2 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class ReadPreferenceTest < Test::Unit::TestCase
@rs.add_arbiter
@rs.remove_secondary_node
@conn = ReplSetConnection.new(build_seeds(2), :read => :secondary_only)
@conn = ReplSetConnection.new(build_seeds(3), :read => :secondary_only)
@db = @conn.db(MONGO_TEST_DB)
@coll = @db.collection("test-sets")

View File

@ -152,6 +152,7 @@ class ReplSetManager
end
con.close
ensure_up
return secondary
end