minor: replica set test fixes

This commit is contained in:
Kyle Banker 2011-08-30 16:16:47 -04:00
parent 8b2de82464
commit e8a5375cbf
3 changed files with 4 additions and 3 deletions

View File

@ -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 ReplicaSetConnectionError, message
raise ConnectionFailure, 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 ReplicaSetConnectionError, message
raise ConnectionFailure, message
end
end
end

View File

@ -354,7 +354,7 @@ module Mongo
if @primary_pool
begin
socket = @primary_pool.checkout
@sockets_to_pools[socket] = @primary
@sockets_to_pools[socket] = @primary_pool
return socket
rescue NoMethodError
end

View File

@ -94,6 +94,7 @@ module Mongo
@read_pool = manager.read_pool
@arbiters = manager.arbiters
@hosts = manager.hosts
@tags_to_pools = {}
end
def initialize_data