summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/jsHeapLimit.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/jsHeapLimit.js')
-rw-r--r--jstests/noPassthrough/jsHeapLimit.js38
1 files changed, 18 insertions, 20 deletions
diff --git a/jstests/noPassthrough/jsHeapLimit.js b/jstests/noPassthrough/jsHeapLimit.js
index 512a79332ad..0089955c4a5 100644
--- a/jstests/noPassthrough/jsHeapLimit.js
+++ b/jstests/noPassthrough/jsHeapLimit.js
@@ -1,26 +1,24 @@
(function() {
- "use strict";
+"use strict";
- const options = {setParameter: "jsHeapLimitMB=1000"};
- const conn = MongoRunner.runMongod(options);
+const options = {
+ setParameter: "jsHeapLimitMB=1000"
+};
+const conn = MongoRunner.runMongod(options);
- // verify JSHeapLimitMB set from the shell
- var assertLimit = function() {
- assert.eq(999, getJSHeapLimitMB());
- };
- var exitCode = runMongoProgram("mongo",
- conn.host,
- "--jsHeapLimitMB",
- 999,
- "--eval",
- "(" + assertLimit.toString() + ")();");
- assert.eq(0, exitCode);
+// verify JSHeapLimitMB set from the shell
+var assertLimit = function() {
+ assert.eq(999, getJSHeapLimitMB());
+};
+var exitCode = runMongoProgram(
+ "mongo", conn.host, "--jsHeapLimitMB", 999, "--eval", "(" + assertLimit.toString() + ")();");
+assert.eq(0, exitCode);
- // verify the JSHeapLimitMB set from Mongod
- const db = conn.getDB('test');
- const res = db.adminCommand({getParameter: 1, jsHeapLimitMB: 1});
- assert.commandWorked(res);
- assert.eq(1000, res.jsHeapLimitMB);
+// verify the JSHeapLimitMB set from Mongod
+const db = conn.getDB('test');
+const res = db.adminCommand({getParameter: 1, jsHeapLimitMB: 1});
+assert.commandWorked(res);
+assert.eq(1000, res.jsHeapLimitMB);
- MongoRunner.stopMongod(conn);
+MongoRunner.stopMongod(conn);
})();