summaryrefslogtreecommitdiff
path: root/jstests/libs/change_stream_rewrite_util.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/libs/change_stream_rewrite_util.js')
-rw-r--r--jstests/libs/change_stream_rewrite_util.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/jstests/libs/change_stream_rewrite_util.js b/jstests/libs/change_stream_rewrite_util.js
index 918873c17bc..ebbb0937222 100644
--- a/jstests/libs/change_stream_rewrite_util.js
+++ b/jstests/libs/change_stream_rewrite_util.js
@@ -138,10 +138,7 @@ function assertNumMatchingOplogEventsForShard(stats, shardName, expectedTotalRet
assert(stats.shards.hasOwnProperty(shardName), stats);
assert.eq(Object.keys(stats.shards[shardName].stages[0])[0], "$cursor", stats);
const executionStats = stats.shards[shardName].stages[0].$cursor.executionStats;
- assert.eq(executionStats.nReturned,
- expectedTotalReturned,
- () => `Expected ${expectedTotalReturned} events on shard ${shardName} but got ` +
- `${executionStats.nReturned}. Execution stats:\n${tojson(executionStats)}`);
+ assert.eq(executionStats.nReturned, expectedTotalReturned, executionStats);
}
// Returns a newly created sharded collection sharded by caller provided shard key.
@@ -183,10 +180,7 @@ function verifyChangeStreamOnWholeCluster(
eventIdentifierList.forEach(eventIdentifier => {
assert.soon(() => cursor.hasNext(), {op: op, eventIdentifier: eventIdentifier});
const event = cursor.next();
- assert.eq(event.operationType,
- op,
- () => `Expected "${op}" but got "${event.operationType}". Full event: ` +
- `${tojson(event)}`);
+ assert.eq(event.operationType, op, event);
if (op == "dropDatabase") {
assert.eq(event.ns.db, eventIdentifier, event);