diff options
author | Kevin Albertson <kevin.albertson@10gen.com> | 2016-07-01 15:20:15 -0400 |
---|---|---|
committer | Kevin Albertson <kevin.albertson@10gen.com> | 2016-07-06 17:04:24 -0400 |
commit | 8833b39af63a926fe7c8538e26666f3c2f20855b (patch) | |
tree | bc50c7b5071896cfdae0971cb4a37c179a0d038e /jstests | |
parent | 0431a36fc20e9a85414ad6acb6f20fbada759b1a (diff) | |
download | mongo-8833b39af63a926fe7c8538e26666f3c2f20855b.tar.gz |
SERVER-24880 Exclude operation latency histogram test from sharding suites
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/core/operation_latency_histogram.js | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/jstests/core/operation_latency_histogram.js b/jstests/core/operation_latency_histogram.js index 4ee4b2f5946..5c30f6f5601 100644 --- a/jstests/core/operation_latency_histogram.js +++ b/jstests/core/operation_latency_histogram.js @@ -6,14 +6,9 @@ var testDB = db.getSiblingDB(name); var testColl = testDB[name + "coll"]; - var inShardedCollection = (db.runCommand({isMaster: 1}).msg == "isdbgrid"); testColl.drop(); - // Insert a document initially so sharding passthrough gets a non-empty response - // from latencyStats. - testColl.insert({x: -1}); - // Test aggregation command output format. var commandResult = testDB.runCommand( {aggregate: testColl.getName(), pipeline: [{$collStats: {latencyStats: {}}}]}); @@ -80,14 +75,12 @@ } lastHistogram = checkHistogramDiff(numRecords, 0, 0); - if (!inShardedCollection) { - // KillCursors - // The last cursor has no additional results, hence does not need to be closed. - for (var i = 0; i < numRecords - 1; i++) { - cursors[i].close(); - } - lastHistogram = checkHistogramDiff(0, 0, numRecords - 1); + // KillCursors + // The last cursor has no additional results, hence does not need to be closed. + for (var i = 0; i < numRecords - 1; i++) { + cursors[i].close(); } + lastHistogram = checkHistogramDiff(0, 0, numRecords - 1); // Remove for (var i = 0; i < numRecords; i++) { @@ -119,11 +112,9 @@ testColl.group({initial: {}, reduce: function() {}, key: {a: 1}}); lastHistogram = checkHistogramDiff(1, 0, 0); - if (!inShardedCollection) { - // ParallelCollectionScan - testDB.runCommand({parallelCollectionScan: testColl.getName(), numCursors: 5}); - lastHistogram = checkHistogramDiff(0, 0, 1); - } + // ParallelCollectionScan + testDB.runCommand({parallelCollectionScan: testColl.getName(), numCursors: 5}); + lastHistogram = checkHistogramDiff(0, 0, 1); // FindAndModify testColl.findAndModify({query: {}, update: {pt: {type: "Point", coordinates: [0, 0]}}}); @@ -168,16 +159,14 @@ testDB.runCommand({collStats: testColl.getName(), validationLevel: "off"})); lastHistogram = checkHistogramDiff(0, 0, 1); - if (!inShardedCollection) { - // Compact - // Use force:true in case we're in replset. - var commandResult = testDB.runCommand({compact: testColl.getName(), force: true}); - // If storage engine supports compact, it should count as a command. - if (!commandResult.ok) { - assert.commandFailedWithCode(commandResult, ErrorCodes.CommandNotSupported); - } - lastHistogram = checkHistogramDiff(0, 0, 1); + // Compact + // Use force:true in case we're in replset. + var commandResult = testDB.runCommand({compact: testColl.getName(), force: true}); + // If storage engine supports compact, it should count as a command. + if (!commandResult.ok) { + assert.commandFailedWithCode(commandResult, ErrorCodes.CommandNotSupported); } + lastHistogram = checkHistogramDiff(0, 0, 1); // DataSize testColl.dataSize(); |