minor: test cleanup

This commit is contained in:
Kyle Banker 2011-08-26 10:59:49 -04:00
parent 5559f91da2
commit 85a53571bc
2 changed files with 7 additions and 7 deletions

View File

@ -34,6 +34,8 @@ class ReplicaSetPooledInsertTest < Test::Unit::TestCase
end
end
threads.each {|t| t.join}
# Restart the old master and wait for sync
RS.restart_killed_nodes
sleep(1)

View File

@ -65,16 +65,14 @@ class ReplicaSetRefreshTest < Test::Unit::TestCase
@conn = ReplSetConnection.new([RS.host, RS.ports[0]], [RS.host, RS.ports[1]],
[RS.host, RS.ports[2]], :refresh_interval => 2, :auto_refresh => true)
assert @conn.secondaries.length == 2
p @conn.secondaries
p @conn.secondary_pools.length
assert_equal 2, @conn.secondaries.length
assert_equal 2, @conn.secondary_pools.length
RS.remove_secondary_node
sleep(6)
sleep(3)
p @conn.secondaries
p @conn.secondary_pools.length
assert @conn.secondaries.length == 1
assert_equal 1, @conn.secondaries.length
assert_equal 1, @conn.secondary_pools.length
end
end