diff --git a/test/tools/repl_set_manager.rb b/test/tools/repl_set_manager.rb index 6369648..2978ead 100644 --- a/test/tools/repl_set_manager.rb +++ b/test/tools/repl_set_manager.rb @@ -187,9 +187,11 @@ class ReplSetManager def kill(node, signal=2) pid = @mongods[node]['pid'] puts "** Killing node with pid #{pid} at port #{@mongods[node]['port']}" - system("kill -#{signal} #{@mongods[node]['pid']}") + begin + get_connection(node)['admin'].command({'shutdown' => 1}) + rescue Mongo::ConnectionFailure + end @mongods[node]['up'] = false - sleep(1) end def kill_primary(signal=2)