diff options
author | Benety Goh <benety@mongodb.com> | 2019-04-23 12:58:39 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-04-23 12:59:09 -0400 |
commit | 8ba7b4845ba747f534f60432a4f9ce19027f30e7 (patch) | |
tree | 381630fa7e69c9efc0a9448c163885b4ca4f06aa /jstests | |
parent | 03a6b3f910e051624dd6b3065b5ee9ea3b6c6fb5 (diff) | |
download | mongo-8ba7b4845ba747f534f60432a4f9ce19027f30e7.tar.gz |
SERVER-40365 add ReplSetTest.getDbPath()
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/replsets/rollback_creates_rollback_directory.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/replsets/rollback_creates_rollback_directory.js b/jstests/replsets/rollback_creates_rollback_directory.js index c0af3044bac..907e81e1f8c 100644 --- a/jstests/replsets/rollback_creates_rollback_directory.js +++ b/jstests/replsets/rollback_creates_rollback_directory.js @@ -35,10 +35,8 @@ function runRollbackDirectoryTest(shouldCreateRollbackFiles) { b_conn.setSlaveOk(); var A = a_conn.getDB("test"); var B = b_conn.getDB("test"); - var AID = replTest.getNodeId(a_conn); - var BID = replTest.getNodeId(b_conn); - var Apath = MongoRunner.dataDir + "/" + testName + "-0/"; - var Bpath = MongoRunner.dataDir + "/" + testName + "-1/"; + var Apath = replTest.getDbPath(a_conn) + '/'; + var Bpath = replTest.getDbPath(b_conn) + '/'; assert(master == conns[0], "conns[0] assumed to be master"); assert(a_conn.host == master.host); @@ -50,12 +48,14 @@ function runRollbackDirectoryTest(shouldCreateRollbackFiles) { var options = {writeConcern: {w: 2, wtimeout: replTest.kDefaultTimeoutMS}, upsert: true}; assert.writeOK(A.foo.update({key: 'value1'}, {$set: {req: 'req'}}, options)); + var AID = replTest.getNodeId(a_conn); replTest.stop(AID); master = replTest.getPrimary(); assert(b_conn.host == master.host); options = {writeConcern: {w: 1, wtimeout: replTest.kDefaultTimeoutMS}, upsert: true}; assert.writeOK(B.foo.update({key: 'value1'}, {$set: {res: 'res'}}, options)); + var BID = replTest.getNodeId(b_conn); replTest.stop(BID); replTest.restart(AID); master = replTest.getPrimary(); @@ -84,7 +84,7 @@ function runRollbackDirectoryTest(shouldCreateRollbackFiles) { // check here for rollback files var rollbackDir = Bpath + "rollback/"; - assert.eq(pathExists(rollbackDir), shouldCreateRollbackFiles); + assert.eq(pathExists(rollbackDir), shouldCreateRollbackFiles, rollbackDir); // Verify data consistency between nodes. replTest.checkReplicatedDataHashes(); |