summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Erf <erf@mongodb.com>2015-12-10 11:50:36 -0500
committerKyle Erf <erf@mongodb.com>2015-12-10 11:50:45 -0500
commit8fe98e70c9ba1e3968ec6f1903edc96c520a5a97 (patch)
tree511e06ac9e513624e064501bf2408750a992f670
parent6933cc43e9cd792dde1f48a4417501ba1e7ae1bc (diff)
downloadmongo-8fe98e70c9ba1e3968ec6f1903edc96c520a5a97.tar.gz
TOOLS-944 write concern tests use correct master
-rw-r--r--test/qa-tests/jstests/files/mongofiles_write_concern.js2
-rw-r--r--test/qa-tests/jstests/files/mongofiles_write_concern_mongos.js2
-rw-r--r--test/qa-tests/jstests/import/import_write_concern.js2
-rw-r--r--test/qa-tests/jstests/libs/wc_framework.js14
-rw-r--r--test/qa-tests/jstests/restore/write_concern.js2
-rw-r--r--test/qa-tests/jstests/restore/write_concern_mongos.js2
6 files changed, 12 insertions, 12 deletions
diff --git a/test/qa-tests/jstests/files/mongofiles_write_concern.js b/test/qa-tests/jstests/files/mongofiles_write_concern.js
index 67fbe6c4f07..4d662cc3bee 100644
--- a/test/qa-tests/jstests/files/mongofiles_write_concern.js
+++ b/test/qa-tests/jstests/files/mongofiles_write_concern.js
@@ -34,7 +34,7 @@
function noConnectTest() {
return startMongoProgramNoConnect.apply(null,
- ['mongofiles', '-d', 'dbOne', '--writeConcern={w:3}','--host',rs.nodes[0].host].
+ ['mongofiles', '-d', 'dbOne', '--writeConcern={w:3}','--host', rs.getMaster().host].
concat(commonToolArgs).
concat(['put', 'jstests/files/testdata/files1.txt'])
);
diff --git a/test/qa-tests/jstests/files/mongofiles_write_concern_mongos.js b/test/qa-tests/jstests/files/mongofiles_write_concern_mongos.js
index 91dec5a14e3..cae9753e8de 100644
--- a/test/qa-tests/jstests/files/mongofiles_write_concern_mongos.js
+++ b/test/qa-tests/jstests/files/mongofiles_write_concern_mongos.js
@@ -33,7 +33,7 @@
function noConnectTest() {
return startMongoProgramNoConnect.apply(null,
- ['mongofiles', '-d', 'dbOne', '--writeConcern={w:3}','--host',rs.nodes[0].host].
+ ['mongofiles', '-d', 'dbOne', '--writeConcern={w:3}','--host', st.s.host].
concat(commonToolArgs).
concat(['put', 'jstests/files/testdata/files1.txt'])
);
diff --git a/test/qa-tests/jstests/import/import_write_concern.js b/test/qa-tests/jstests/import/import_write_concern.js
index de4fd6cf52a..f7c296fcd71 100644
--- a/test/qa-tests/jstests/import/import_write_concern.js
+++ b/test/qa-tests/jstests/import/import_write_concern.js
@@ -33,7 +33,7 @@
function noConnectTest() {
return startMongoProgramNoConnect.apply(null,
- ['mongoimport','--writeConcern={w:3}','--host',rs.nodes[0].host,'--file',fileTarget].
+ ['mongoimport','--writeConcern={w:3}','--host',rs.getMaster().host,'--file',fileTarget].
concat(commonToolArgs)
);
}
diff --git a/test/qa-tests/jstests/libs/wc_framework.js b/test/qa-tests/jstests/libs/wc_framework.js
index f955ffe8e3b..0399e18c458 100644
--- a/test/qa-tests/jstests/libs/wc_framework.js
+++ b/test/qa-tests/jstests/libs/wc_framework.js
@@ -26,17 +26,17 @@ var runWCTest = function runWCTest(progName, rs, toolTest, testWriteConcern, tes
testWriteConcern(0, ['--writeConcern=majority'], progName+" with majority to a fully functioning repl-set should succeed");
- testWriteConcern(0, ['--writeConcern={w:1,wtimeout:2000}'], progName+" with w:1,timeout:2000 to a fully functioning repl-set should succeed");
+ testWriteConcern(0, ['--writeConcern={w:1,wtimeout:10000}'], progName+" with w:1,timeout:10000 to a fully functioning repl-set should succeed");
- testWriteConcern(0, ['--writeConcern={w:2,wtimeout:2000}'], progName+" with w:2,timeout:2000 to a fully functioning repl-set should succeed");
+ testWriteConcern(0, ['--writeConcern={w:2,wtimeout:10000}'], progName+" with w:2,timeout:10000 to a fully functioning repl-set should succeed");
jsTest.log("stopping one node from doing any further syncing");
member1.runCommand({configureFailPoint: 'rsSyncApplyStop', mode: 'alwaysOn'});
sleep(2000);
- testWriteConcern(0, ['--writeConcern={w:2,wtimeout:2000}'], progName+" with w:2,timeout:2000 repl-set with 2 working nodes should succeed");
+ testWriteConcern(0, ['--writeConcern={w:2,wtimeout:10000}'], progName+" with w:2,timeout:10000 repl-set with 2 working nodes should succeed");
- testWriteConcern(0, ['--writeConcern=majority'], progName+" with majority with one working node should succeed");
+ testWriteConcern(0, ['--writeConcern=majority'], progName+" with majority with two working nodes should succeed");
testWriteConcern(1, ['--writeConcern={w:3,wtimeout:2000}'], progName+" with w:3,timeout:2000 repl-set with two working nodes should fail");
@@ -46,9 +46,9 @@ var runWCTest = function runWCTest(progName, rs, toolTest, testWriteConcern, tes
testWriteConcern(1, [windowsEscape('--writeConcern={w:"majority",wtimeout:2000}')], progName+" with majority with no working nodes should fail");
- testWriteConcern(1, ['--writeConcern={w:2,wtimeout:2000}'], progName+" with w:2,timeout:2000 to a fully functioning repl-set should succeed");
+ testWriteConcern(1, ['--writeConcern={w:2,wtimeout:10000}'], progName+" with w:2,timeout:10000 to a fully functioning repl-set should succeed");
- testWriteConcern(0, ['--writeConcern={w:1,wtimeout:2000}'], progName+" with w:1,timeout:2000 repl-set with one working nodes should succeed");
+ testWriteConcern(0, ['--writeConcern={w:1,wtimeout:10000}'], progName+" with w:1,timeout:10000 repl-set with one working nodes should succeed");
jsTest.log(progName+" with w:3 concern and no working member and no timeout waits until member are available");
pid = testProgramNoConnect()
@@ -62,7 +62,7 @@ var runWCTest = function runWCTest(progName, rs, toolTest, testWriteConcern, tes
member1.runCommand({configureFailPoint: 'rsSyncApplyStop', mode: 'off'});
member2.runCommand({configureFailPoint: 'rsSyncApplyStop', mode: 'off'});
- jsTest.log("waiting for import to finish");
+ jsTest.log("waiting for "+progName+" to finish");
ret = waitProgram(pid);
assert.eq(0, ret, progName+" with w:3 should succeed once enough members start working");
}
diff --git a/test/qa-tests/jstests/restore/write_concern.js b/test/qa-tests/jstests/restore/write_concern.js
index 1e98ea4f3a0..7ce6b266d74 100644
--- a/test/qa-tests/jstests/restore/write_concern.js
+++ b/test/qa-tests/jstests/restore/write_concern.js
@@ -33,7 +33,7 @@
function noConnectTest() {
return startMongoProgramNoConnect.apply(null,
- ['mongorestore','--writeConcern={w:3}','--host',rs.nodes[0].host].
+ ['mongorestore','--writeConcern={w:3}','--host',rs.getMaster().host].
concat(getRestoreTarget(dumpTarget)).
concat(commonToolArgs)
);
diff --git a/test/qa-tests/jstests/restore/write_concern_mongos.js b/test/qa-tests/jstests/restore/write_concern_mongos.js
index 113acfca742..b8a1c13fc2f 100644
--- a/test/qa-tests/jstests/restore/write_concern_mongos.js
+++ b/test/qa-tests/jstests/restore/write_concern_mongos.js
@@ -31,7 +31,7 @@
function noConnectTest() {
return startMongoProgramNoConnect.apply(null,
- ['mongorestore','--writeConcern={w:3}','--host',rs.nodes[0].host].
+ ['mongorestore','--writeConcern={w:3}', '--host', st.s.host].
concat(getRestoreTarget(dumpTarget)).
concat(commonToolArgs)
);