We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 640f1c0 commit b8137c7Copy full SHA for b8137c7
test/slave_connection_test.rb
@@ -8,8 +8,8 @@ def self.connect_to_slave
8
@@host = ENV['MONGO_RUBY_DRIVER_HOST'] || 'localhost'
9
@@port = ENV['MONGO_RUBY_DRIVER_PORT'] || Connection::DEFAULT_PORT
10
conn = Connection.new(@@host, @@port, :slave_ok => true)
11
- cmd = conn['admin'].command(:ismaster => 1)
12
- cmd['ok'] == 1 && cmd['ismaster'] != 1
+ response = conn['admin'].command(:ismaster => 1)
+ Mongo::Support.ok?(response['ok']) && response['ismaster'] != 1
13
end
14
15
if self.connect_to_slave
0 commit comments