minor: read preference test fix
Secondary to remove is randomly chosen so test would randomly fail before this fix.
This commit is contained in:
parent
4df2564519
commit
351eeb65a2
|
@ -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")
|
||||
|
|
|
@ -152,6 +152,7 @@ class ReplSetManager
|
|||
end
|
||||
|
||||
con.close
|
||||
ensure_up
|
||||
|
||||
return secondary
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue