diff --git a/lib/mongo/node.rb b/lib/mongo/node.rb index b7fcf5c..aa9a302 100644 --- a/lib/mongo/node.rb +++ b/lib/mongo/node.rb @@ -158,7 +158,7 @@ module Mongo if !config['hosts'] message = "Will not connect to #{host_string} because it's not a member " + "of a replica set." - raise ConnectionFailure, message + raise ReplicaSetConnectionError, message end end @@ -171,7 +171,7 @@ module Mongo elsif self.connection.replica_set_name != config['setName'] message = "Attempting to connect to replica set '#{config['setName']}' on member #{host_string} " + "but expected '#{self.connection.replica_set_name}'" - raise ConnectionFailure, message + raise ReplicaSetConnectionError, message end end end diff --git a/test/replica_sets/refresh_test.rb b/test/replica_sets/refresh_test.rb index f703c19..fcf65c0 100644 --- a/test/replica_sets/refresh_test.rb +++ b/test/replica_sets/refresh_test.rb @@ -69,7 +69,7 @@ class ReplicaSetRefreshTest < Test::Unit::TestCase assert_equal 2, @conn.secondary_pools.length RS.remove_secondary_node - sleep(3) + sleep(4) assert_equal 1, @conn.secondaries.length assert_equal 1, @conn.secondary_pools.length