summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorAndrew Morrow <andrew.morrow@10gen.com>2019-12-10 20:05:44 +0000
committerevergreen <evergreen@mongodb.com>2019-12-10 20:05:44 +0000
commit825f7246e8a973f134c533d0d1f3b68abeeba010 (patch)
treec33d63d86281bb300da2c019ae08928b7d215307 /jstests
parent711b443933b323f7cb9c9fa4256a37a777bf58e2 (diff)
downloadmongo-825f7246e8a973f134c533d0d1f3b68abeeba010.tar.gz
SERVER-44546 Remove mobile variants and embedded benchmarksr4.0.14-rc0
(cherry picked from commit be05c9ea62d6f01895545628992f1899426b88c4) (cherry picked from commit c51ba0a06ede1d87cd8df637f379bb3ceabad6fa)
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core_standalone/write_concern.js4
-rw-r--r--jstests/libs/mongoebench.js49
-rw-r--r--jstests/noPassthrough/mongoebench_test.js51
3 files changed, 2 insertions, 102 deletions
diff --git a/jstests/core_standalone/write_concern.js b/jstests/core_standalone/write_concern.js
index fd4036e6925..5c7846c7905 100644
--- a/jstests/core_standalone/write_concern.js
+++ b/jstests/core_standalone/write_concern.js
@@ -1,4 +1,4 @@
-// This test verifies writeConcern behavior on a standalone mongod or embedded mongoed.
+// This test verifies writeConcern behavior on a standalone mongod.
(function() {
'use strict';
@@ -15,4 +15,4 @@
assert.writeError(col.insert({_id: 2}, {writeConcern: {w: 2}}),
"expected writeConcern: 2 to fail");
-})(); \ No newline at end of file
+})();
diff --git a/jstests/libs/mongoebench.js b/jstests/libs/mongoebench.js
deleted file mode 100644
index f6feb4eb9f0..00000000000
--- a/jstests/libs/mongoebench.js
+++ /dev/null
@@ -1,49 +0,0 @@
-"use strict";
-
-var {runMongoeBench} = (function() {
-
- /**
- * Spawns a mongoebench process with the specified options.
- *
- * If a plain JavaScript object is specified as the 'config' parameter, then it is serialized to
- * a file as a JSON string which is then specified as the config file for the mongoebench
- * process.
- */
- function runMongoeBench(config, options = {}) {
- const args = ["mongoebench"];
-
- if (typeof config === "object") {
- const filename = MongoRunner.dataPath + "mongoebench_config.json";
- writeFile(filename, tojson(config));
- args.push(filename);
- } else if (typeof config === "string") {
- args.push(config);
- } else {
- throw new Error("'config' parameter must be a string or an object");
- }
-
- if (!options.hasOwnProperty("dbpath")) {
- options.dbpath = MongoRunner.dataDir;
- }
-
- for (let key of Object.keys(options)) {
- const value = options[key];
- if (value === null || value === undefined) {
- throw new Error(
- "Value '" + value + "' for '" + key +
- "' option is ambiguous; specify {flag: ''} to add --flag command line" +
- " options'");
- }
-
- args.push("--" + key);
- if (value !== "") {
- args.push(value.toString());
- }
- }
-
- const exitCode = _runMongoProgram(...args);
- assert.eq(0, exitCode, "encountered an error in mongoebench");
- }
-
- return {runMongoeBench};
-})();
diff --git a/jstests/noPassthrough/mongoebench_test.js b/jstests/noPassthrough/mongoebench_test.js
deleted file mode 100644
index 1ae0e6ba29f..00000000000
--- a/jstests/noPassthrough/mongoebench_test.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Tests for the mongoebench executable.
- */
-(function() {
- "use strict";
-
- load("jstests/libs/mongoebench.js"); // for runMongoeBench
-
- if (jsTest.options().storageEngine !== "mobile") {
- print("Skipping test because storage engine isn't mobile");
- return;
- }
-
- const dbpath = MongoRunner.dataPath + "mongoebench_test";
- resetDbpath(dbpath);
-
- // Test that the operations in the "pre" section of the configuration are run exactly once.
- runMongoeBench( // Force clang-format to break this line.
- {
- pre: [{
- op: "insert",
- ns: "test.mongoebench_test",
- doc: {pre: {"#SEQ_INT": {seq_id: 0, start: 0, step: 1, unique: true}}}
- }],
- ops: [{
- op: "update",
- ns: "test.mongoebench_test",
- update: {$inc: {ops: 1}},
- multi: true,
- }]
- },
- {dbpath});
-
- const output = cat(dbpath + "/perf.json");
- const stats = assert.doesNotThrow(
- JSON.parse, [output], "failed to parse output file as strict JSON: " + output);
- assert.eq({$numberLong: "0"},
- stats.errCount,
- () => "stats file reports errors but exit code was zero: " + tojson(stats));
- assert(stats.hasOwnProperty("totalOps/s"),
- () => "stats file doesn't report ops per second: " + tojson(stats));
-
- const conn = MongoRunner.runMongod({dbpath, noCleanData: true});
- assert.neq(null, conn, "failed to start mongod after running mongoebench");
-
- const db = conn.getDB("test");
- const count = db.mongoebench_test.find().itcount();
- assert.eq(1, count, "ops in 'pre' section ran more than once or didn't run at all");
-
- MongoRunner.stopMongod(conn);
-})();