minor: test fix

This commit is contained in:
Kyle Banker 2011-08-31 11:46:33 -04:00
parent 3c31dc6acd
commit 7769f4d44d
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ module Mongo
if !config['hosts'] if !config['hosts']
message = "Will not connect to #{host_string} because it's not a member " + message = "Will not connect to #{host_string} because it's not a member " +
"of a replica set." "of a replica set."
raise ConnectionFailure, message raise ReplicaSetConnectionError, message
end end
end end
@ -171,7 +171,7 @@ module Mongo
elsif self.connection.replica_set_name != config['setName'] elsif self.connection.replica_set_name != config['setName']
message = "Attempting to connect to replica set '#{config['setName']}' on member #{host_string} " + message = "Attempting to connect to replica set '#{config['setName']}' on member #{host_string} " +
"but expected '#{self.connection.replica_set_name}'" "but expected '#{self.connection.replica_set_name}'"
raise ConnectionFailure, message raise ReplicaSetConnectionError, message
end end
end end
end end

View File

@ -69,7 +69,7 @@ class ReplicaSetRefreshTest < Test::Unit::TestCase
assert_equal 2, @conn.secondary_pools.length assert_equal 2, @conn.secondary_pools.length
RS.remove_secondary_node RS.remove_secondary_node
sleep(3) sleep(4)
assert_equal 1, @conn.secondaries.length assert_equal 1, @conn.secondaries.length
assert_equal 1, @conn.secondary_pools.length assert_equal 1, @conn.secondary_pools.length