minor: test cleanup
This commit is contained in:
parent
5559f91da2
commit
85a53571bc
|
@ -34,6 +34,8 @@ class ReplicaSetPooledInsertTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
threads.each {|t| t.join}
|
||||||
|
|
||||||
# Restart the old master and wait for sync
|
# Restart the old master and wait for sync
|
||||||
RS.restart_killed_nodes
|
RS.restart_killed_nodes
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
|
@ -65,16 +65,14 @@ class ReplicaSetRefreshTest < Test::Unit::TestCase
|
||||||
@conn = ReplSetConnection.new([RS.host, RS.ports[0]], [RS.host, RS.ports[1]],
|
@conn = ReplSetConnection.new([RS.host, RS.ports[0]], [RS.host, RS.ports[1]],
|
||||||
[RS.host, RS.ports[2]], :refresh_interval => 2, :auto_refresh => true)
|
[RS.host, RS.ports[2]], :refresh_interval => 2, :auto_refresh => true)
|
||||||
|
|
||||||
assert @conn.secondaries.length == 2
|
assert_equal 2, @conn.secondaries.length
|
||||||
p @conn.secondaries
|
assert_equal 2, @conn.secondary_pools.length
|
||||||
p @conn.secondary_pools.length
|
|
||||||
|
|
||||||
RS.remove_secondary_node
|
RS.remove_secondary_node
|
||||||
sleep(6)
|
sleep(3)
|
||||||
|
|
||||||
p @conn.secondaries
|
assert_equal 1, @conn.secondaries.length
|
||||||
p @conn.secondary_pools.length
|
assert_equal 1, @conn.secondary_pools.length
|
||||||
assert @conn.secondaries.length == 1
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue