summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/lock_file.js
diff options
context:
space:
mode:
authorclang-format-7.0.1 <adam.martin@10gen.com>2019-07-26 18:20:35 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-07-27 11:02:23 -0400
commit134a4083953270e8a11430395357fb70a29047ad (patch)
treedd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /jstests/noPassthrough/lock_file.js
parent1e46b5049003f427047e723ea5fab15b5a9253ca (diff)
downloadmongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'jstests/noPassthrough/lock_file.js')
-rw-r--r--jstests/noPassthrough/lock_file.js38
1 files changed, 18 insertions, 20 deletions
diff --git a/jstests/noPassthrough/lock_file.js b/jstests/noPassthrough/lock_file.js
index 5ff9a897bf9..63311e22bfb 100644
--- a/jstests/noPassthrough/lock_file.js
+++ b/jstests/noPassthrough/lock_file.js
@@ -2,30 +2,28 @@
// containing the process ID regardless of the storage engine requested.
(function() {
- // Ensures that mongod.lock exists and returns size of file.
- function getMongodLockFileSize(dir) {
- var files = listFiles(dir);
- for (var i in files) {
- var file = files[i];
- if (!file.isDirectory && file.baseName == 'mongod.lock') {
- return file.size;
- }
+// Ensures that mongod.lock exists and returns size of file.
+function getMongodLockFileSize(dir) {
+ var files = listFiles(dir);
+ for (var i in files) {
+ var file = files[i];
+ if (!file.isDirectory && file.baseName == 'mongod.lock') {
+ return file.size;
}
- assert(false, 'mongod.lock not found in data directory ' + dir);
}
+ assert(false, 'mongod.lock not found in data directory ' + dir);
+}
- var baseName = "jstests_lock_file";
- var dbpath = MongoRunner.dataPath + baseName + '/';
+var baseName = "jstests_lock_file";
+var dbpath = MongoRunner.dataPath + baseName + '/';
- // Test framework will append --storageEngine command line option.
- var mongod = MongoRunner.runMongod({dbpath: dbpath});
- assert.neq(0,
- getMongodLockFileSize(dbpath),
- 'mongod.lock should not be empty while server is running');
+// Test framework will append --storageEngine command line option.
+var mongod = MongoRunner.runMongod({dbpath: dbpath});
+assert.neq(
+ 0, getMongodLockFileSize(dbpath), 'mongod.lock should not be empty while server is running');
- MongoRunner.stopMongod(mongod);
+MongoRunner.stopMongod(mongod);
- // mongod.lock must be empty after shutting server down.
- assert.eq(
- 0, getMongodLockFileSize(dbpath), 'mongod.lock not truncated after shutting server down');
+// mongod.lock must be empty after shutting server down.
+assert.eq(0, getMongodLockFileSize(dbpath), 'mongod.lock not truncated after shutting server down');
}());