summaryrefslogtreecommitdiff
path: root/jstests/watchdog/wd_journal_hang.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/watchdog/wd_journal_hang.js')
-rw-r--r--jstests/watchdog/wd_journal_hang.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/jstests/watchdog/wd_journal_hang.js b/jstests/watchdog/wd_journal_hang.js
index c07b4298170..e33931cf5dd 100644
--- a/jstests/watchdog/wd_journal_hang.js
+++ b/jstests/watchdog/wd_journal_hang.js
@@ -4,30 +4,30 @@
load("jstests/watchdog/lib/wd_test_common.js");
(function() {
- 'use strict';
+'use strict';
- function trimTrailingSlash(dir) {
- if (dir.endsWith('/')) {
- return dir.substring(0, dir.length - 1);
- }
-
- return dir;
+function trimTrailingSlash(dir) {
+ if (dir.endsWith('/')) {
+ return dir.substring(0, dir.length - 1);
}
- let control = new CharybdefsControl("journalpath_hang");
+ return dir;
+}
+
+let control = new CharybdefsControl("journalpath_hang");
- const journalFusePath = control.getMountPath();
+const journalFusePath = control.getMountPath();
- const dbPath = MongoRunner.toRealDir("$dataDir/mongod-journal");
+const dbPath = MongoRunner.toRealDir("$dataDir/mongod-journal");
- const journalLinkPath = dbPath + "/journal";
+const journalLinkPath = dbPath + "/journal";
- resetDbpath(dbPath);
+resetDbpath(dbPath);
- // Create a symlink from the non-fuse journal directory to the fuse mount.
- const ret = run("ln", "-s", trimTrailingSlash(journalFusePath), journalLinkPath);
- assert.eq(ret, 0);
+// Create a symlink from the non-fuse journal directory to the fuse mount.
+const ret = run("ln", "-s", trimTrailingSlash(journalFusePath), journalLinkPath);
+assert.eq(ret, 0);
- // Set noCleanData so that the dbPath is not cleaned because we want to use the journal symlink.
- testFuseAndMongoD(control, {dbpath: dbPath, noCleanData: true});
+// Set noCleanData so that the dbPath is not cleaned because we want to use the journal symlink.
+testFuseAndMongoD(control, {dbpath: dbPath, noCleanData: true});
})();