From 7769f4d44d12c5cf7b940d147b5980d85016193f Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Wed, 31 Aug 2011 11:46:33 -0400 Subject: [PATCH] minor: test fix --- lib/mongo/node.rb | 4 ++-- test/replica_sets/refresh_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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