summaryrefslogtreecommitdiff
path: root/jstests/aggregation/testshard1.js
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2016-10-24 11:35:26 -0400
committerCharlie Swanson <charlie.swanson@mongodb.com>2016-11-09 11:03:34 -0500
commit23681bf8db5a2d6ce2a969de7ec6ff5284a19169 (patch)
tree800761ea59ba6879670c701a811e8a7e991eb6e5 /jstests/aggregation/testshard1.js
parent9abe003a4307295f4a3785527ac7ff633383b39a (diff)
downloadmongo-23681bf8db5a2d6ce2a969de7ec6ff5284a19169.tar.gz
SERVER-26742 Increase verbosity during testshard1.js
Diffstat (limited to 'jstests/aggregation/testshard1.js')
-rw-r--r--jstests/aggregation/testshard1.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/jstests/aggregation/testshard1.js b/jstests/aggregation/testshard1.js
index 2f5cbd39d04..1dfc74725ca 100644
--- a/jstests/aggregation/testshard1.js
+++ b/jstests/aggregation/testshard1.js
@@ -17,8 +17,17 @@ function aggregateNoOrder(coll, pipeline) {
}
jsTestLog("Creating sharded cluster");
-var shardedAggTest =
- new ShardingTest({shards: 2, mongos: 1, other: {chunkSize: 1, enableBalancer: true}});
+var shardedAggTest = new ShardingTest({
+ shards: 2,
+ mongos: 1,
+ other: {
+ chunkSize: 1,
+ enableBalancer: true,
+ mongosOptions: {verbose: ''},
+ shardOptions: {verbose: ''},
+ configOptions: {verbose: ''},
+ }
+});
jsTestLog("Setting up sharded cluster");
shardedAggTest.adminCommand({enablesharding: "aggShard"});
@@ -193,6 +202,7 @@ testAvgStdDev();
function testSample() {
jsTestLog('testing $sample');
+ shardedAggTest.printCollectionInfo(db.ts1.getFullName());
[0, 1, 10, nItems, nItems + 1].forEach(function(size) {
var res = db.ts1.aggregate([{$sample: {size: size}}]).toArray();
assert.eq(res.length, Math.min(nItems, size));
@@ -200,6 +210,13 @@ function testSample() {
}
testSample();
+// SERVER-26742 Attempt to reproduce an incorrect number of results being returned.
+testSample();
+testSample();
+testSample();
+testSample();
+testSample();
+
jsTestLog('test $out by copying source collection verbatim to output');
var outCollection = db.ts1_out;
var res = aggregateOrdered(db.ts1, [{$out: outCollection.getName()}]);