Skip to content

Commit a9c7a1b

Browse files
committed
SERVER-42461 Allow errors in aggregates_during_balancing.js pending work in SERVER-29446
1 parent 5c13fd1 commit a9c7a1b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

jstests/sharding/aggregates_during_balancing.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,14 @@ testAvgStdDev();
176176
function testSample() {
177177
jsTestLog('testing $sample');
178178
[0, 1, 10, nItems, nItems + 1].forEach(function(size) {
179-
var res = db.ts1.aggregate([{$sample: {size: size}}]).toArray();
179+
// TODO: SERVER-29446 Remove this try catch block after completing SERVER-29446.
180+
let res = {};
181+
try {
182+
res = db.ts1.aggregate([{$sample: {size: size}}]).toArray();
183+
} catch (e) {
184+
assert.eq(e.code, 28799, e);
185+
return;
186+
}
180187
assert.eq(res.length, Math.min(nItems, size));
181188
});
182189
}

0 commit comments

Comments
 (0)