Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
Fully Compatible
-
40
Description
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 |
|
87
|
// Positive test. ~10s operation, 2s limit. The operation takes ~10s because each shard |
88
|
// processes 25 batches of ~400ms each, and the shards are processing getMores in parallel. |
89
|
cursor = coll.find({
|
90
|
$where: function() { |
91
|
sleep(200);
|
92
|
return true; |
93
|
}
|
94
|
});
|
95
|
cursor.batchSize(2);
|
96
|
cursor.maxTimeMS(2 * 1000);
|
97
|
assert.doesNotThrow(
|
98
|
() => cursor.next(), [], "did not expect mongos to time out first batch of query"); |
99
|
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.