summaryrefslogtreecommitdiff
path: root/jstests/sharding/read_pref.js
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2016-10-17 10:51:33 -0400
committerJames Wahlin <james.wahlin@10gen.com>2016-10-17 12:52:23 -0400
commitc66e3f224205ff00ec67b63a081fc7ce980e5855 (patch)
treec94148d435d1fdd98225e14c25251b9eac6d88fc /jstests/sharding/read_pref.js
parent40c24abaa05450c612f00209b81d63d3c6acd35b (diff)
downloadmongo-c66e3f224205ff00ec67b63a081fc7ce980e5855.tar.gz
SERVER-26435 Refactor replsettest.js to reduce size
Diffstat (limited to 'jstests/sharding/read_pref.js')
-rw-r--r--jstests/sharding/read_pref.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/jstests/sharding/read_pref.js b/jstests/sharding/read_pref.js
index 743820e02db..1faeffa3a44 100644
--- a/jstests/sharding/read_pref.js
+++ b/jstests/sharding/read_pref.js
@@ -3,6 +3,8 @@
* can be found in dbtests/replica_set_monitor_test.cpp.
*/
+load("jstests/replsets/rslib.js");
+
var PRI_TAG = {dc: 'ny'};
var SEC_TAGS = [{dc: 'sf', s: "1"}, {dc: 'ma', s: "2"}, {dc: 'eu', s: "3"}, {dc: 'jp', s: "4"}];
var NODES = SEC_TAGS.length + 1;
@@ -72,7 +74,7 @@ var doTest = function(useDollarQuerySyntax) {
var replConfig = replTest.getReplSetConfigFromNode();
replConfig.members.forEach(function(node) {
var nodeConn = new Mongo(node.host);
- ReplSetTest.awaitRSClientHosts(conn, nodeConn, {ok: true, tags: node.tags}, replTest);
+ awaitRSClientHosts(conn, nodeConn, {ok: true, tags: node.tags}, replTest);
});
replTest.awaitReplication();
@@ -172,11 +174,11 @@ var doTest = function(useDollarQuerySyntax) {
}
// Wait for ReplicaSetMonitor to realize nodes are down
- ReplSetTest.awaitRSClientHosts(conn, stoppedNodes, {ok: false}, replTest.name);
+ awaitRSClientHosts(conn, stoppedNodes, {ok: false}, replTest.name);
// Wait for the last node to be in steady state -> secondary (not recovering)
var lastNode = replTest.nodes[NODES - 1];
- ReplSetTest.awaitRSClientHosts(conn, lastNode, {ok: true, secondary: true}, replTest.name);
+ awaitRSClientHosts(conn, lastNode, {ok: true, secondary: true}, replTest.name);
jsTest.log('connpool: ' + tojson(conn.getDB('admin').runCommand({connPoolStats: 1})));