-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework, JavaScript, Querying, Testing Infrastructure
-
None
-
Fully Compatible
-
40
In recent test runs on some of our slowest test infrastructure (the variant which collects code coverage), this assertion has been failing:
max_time_ms_sharded.js:97
// Positive test. ~10s operation, 2s limit. The operation takes ~10s because each shard // processes 25 batches of ~400ms each, and the shards are processing getMores in parallel. cursor = coll.find({ $where: function() { sleep(200); return true; } }); cursor.batchSize(2); cursor.maxTimeMS(2 * 1000); assert.doesNotThrow( () => cursor.next(), [], "did not expect mongos to time out first batch of query"); assert.throws(() => cursor.itcount(), [], "expected mongos to abort getmore due to time limit");
We can write a more robust test case which verifies the same thing, so we should do so.