minor: possible fix for replica set refresh test not passing due to ghost members

This commit is contained in:
Tyler Brock 2012-02-13 19:21:11 -05:00
parent a3fa4892a6
commit e21adbd781

View File

@ -6,7 +6,6 @@ class ReplicaSetRefreshTest < Test::Unit::TestCase
def setup def setup
ensure_rs ensure_rs
@conn = nil
end end
def teardown def teardown
@ -41,6 +40,7 @@ class ReplicaSetRefreshTest < Test::Unit::TestCase
def test_connect_and_manual_refresh_with_secondaries_down def test_connect_and_manual_refresh_with_secondaries_down
@rs.kill_all_secondaries @rs.kill_all_secondaries
sleep(4)
rescue_connection_failure do rescue_connection_failure do
@conn = ReplSetConnection.new([@rs.host, @rs.ports[0]], @conn = ReplSetConnection.new([@rs.host, @rs.ports[0]],
@ -72,7 +72,8 @@ class ReplicaSetRefreshTest < Test::Unit::TestCase
def test_automated_refresh_with_secondaries_down def test_automated_refresh_with_secondaries_down
@rs.kill_all_secondaries @rs.kill_all_secondaries
sleep(4)
rescue_connection_failure do rescue_connection_failure do
@conn = ReplSetConnection.new([@rs.host, @rs.ports[0]], @conn = ReplSetConnection.new([@rs.host, @rs.ports[0]],
[@rs.host, @rs.ports[1]], [@rs.host, @rs.ports[1]],