minor: test fix for legacy mongo
This commit is contained in:
parent
d42eee278b
commit
b2a1841f9c
@ -10,7 +10,6 @@ class ReplicaSetRefreshWithThreadsTest < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def teardown
|
def teardown
|
||||||
@rs.restart_killed_nodes
|
|
||||||
@conn.close if @conn
|
@conn.close if @conn
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -45,11 +44,14 @@ class ReplicaSetRefreshWithThreadsTest < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue_connection_failure do
|
@rs.add_node
|
||||||
@rs.add_node
|
|
||||||
threads.each {|t| t.join }
|
|
||||||
end
|
|
||||||
|
|
||||||
|
begin
|
||||||
|
threads.each {|t| t.join }
|
||||||
|
rescue ConnectionFailure
|
||||||
|
# 1.8x will raise connection failures
|
||||||
|
end
|
||||||
|
|
||||||
@conn['admin'].command({:ismaster => 1})
|
@conn['admin'].command({:ismaster => 1})
|
||||||
|
|
||||||
assert_equal 3, @conn.secondary_pools.length
|
assert_equal 3, @conn.secondary_pools.length
|
||||||
|
@ -46,7 +46,7 @@ class ReplSetManager
|
|||||||
end
|
end
|
||||||
|
|
||||||
def start_set
|
def start_set
|
||||||
system("killall mongod > /dev/null 2>/dev/null")
|
system("killall mongod > /dev/null 2> /dev/null")
|
||||||
sleep(1)
|
sleep(1)
|
||||||
should_start = true
|
should_start = true
|
||||||
#puts "** Starting a replica set with #{@count} nodes"
|
#puts "** Starting a replica set with #{@count} nodes"
|
||||||
|
Loading…
Reference in New Issue
Block a user