summaryrefslogtreecommitdiff
path: root/jstests/hooks
diff options
context:
space:
mode:
authorYves Duhem <yves.duhem@mongodb.com>2017-09-01 17:40:29 -0400
committerYves Duhem <yves.duhem@mongodb.com>2017-09-01 17:41:35 -0400
commit2f6a2294feb20a9a3a11dcdbfbfed05f4756c1b2 (patch)
tree7016c0c574b55768eac13413e21ff5a849c1a9fd /jstests/hooks
parentedfcb9cfbef2f0bcd85cd46cb1b9ccbe89d0f299 (diff)
downloadmongo-2f6a2294feb20a9a3a11dcdbfbfed05f4756c1b2.tar.gz
SERVER-30683 Support failovers in ReplicaSetFixture
Diffstat (limited to 'jstests/hooks')
-rw-r--r--jstests/hooks/run_check_repl_dbhash.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/jstests/hooks/run_check_repl_dbhash.js b/jstests/hooks/run_check_repl_dbhash.js
index 479abf5cf25..1afea4a8539 100644
--- a/jstests/hooks/run_check_repl_dbhash.js
+++ b/jstests/hooks/run_check_repl_dbhash.js
@@ -9,14 +9,8 @@
// fixture. Please do not use it with other master/slave clusters.
var MasterSlaveDBHashTest = function(primaryHost) {
var master = new Mongo(primaryHost);
- var resolvedHost = getHostName();
var masterPort = master.host.split(':')[1];
- // The 'host' property is modified manually because 'localhost' is used by default in a new
- // Mongo() connection. We set the value to the real hostname because that is what the server
- // uses.
- master.host = resolvedHost + ':' + masterPort;
-
- var slave = new Mongo(resolvedHost + ':' + String(parseInt(masterPort) + 1));
+ var slave = new Mongo('localhost:' + String(parseInt(masterPort) + 1));
this.nodeList = function() {
return [master.host, slave.host];