From 6ccb82c987a47995fd7d8019d7fd4d1e557478b4 Mon Sep 17 00:00:00 2001 From: Spencer T Brody Date: Sun, 22 Mar 2015 12:08:21 -0400 Subject: SERVER-17450 Standardize on a single way to start mongod in tests --- jstests/mmap_v1/dur_big_atomic_update.js | 6 ++---- jstests/mmap_v1/dur_remove_old_journals.js | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'jstests/mmap_v1') diff --git a/jstests/mmap_v1/dur_big_atomic_update.js b/jstests/mmap_v1/dur_big_atomic_update.js index 04531a75fd1..33cd88e22b2 100644 --- a/jstests/mmap_v1/dur_big_atomic_update.js +++ b/jstests/mmap_v1/dur_big_atomic_update.js @@ -2,9 +2,7 @@ // // this tests writing 1GB in an atomic update to make sure we commit periodically -var path = MongoRunner.dataDir + "/dur_big_atomic_update"; - -conn = startMongodEmpty("--port", 30001, "--dbpath", path, "--dur", "--durOptions", 8); +var conn = MongoRunner.runMongod({dur: "", durOptions: 8}); d = conn.getDB("test"); d.foo.drop(); @@ -49,6 +47,6 @@ assert(err.n == 1024); // free up space d.dropDatabase(); -stopMongod(30001); +MongoRunner.stopMongod(conn); print("dur big atomic update SUCCESS"); diff --git a/jstests/mmap_v1/dur_remove_old_journals.js b/jstests/mmap_v1/dur_remove_old_journals.js index 59f50f9c359..56178af2cb6 100644 --- a/jstests/mmap_v1/dur_remove_old_journals.js +++ b/jstests/mmap_v1/dur_remove_old_journals.js @@ -10,7 +10,7 @@ else { PATH = MongoRunner.dataDir + "/dur_remove_old_journals"; SYNC_DELAY = 5; // must be a number - conn = startMongodEmpty("--port", 30001, "--dbpath", PATH, "--dur", "--smallfiles", "--syncdelay", ''+SYNC_DELAY); + var conn = MongoRunner.runMongod({dbpath: PATH, dur: "", smallfiles: "", syncdelay: SYNC_DELAY}); db = conn.getDB("test"); longString = 'x'; @@ -51,7 +51,7 @@ else { assert.eq(2, nfiles); // latest journal file and lsn - stopMongod(30001); + MongoRunner.stopMongod(conn); } print("*** success ***"); -- cgit v1.2.1