diff --git a/jstests/noPassthrough/out_max_time_ms.js b/jstests/noPassthrough/out_max_time_ms.js
|
index 36268ff645..0212c30a7e 100644
|
--- a/jstests/noPassthrough/out_max_time_ms.js
|
+++ b/jstests/noPassthrough/out_max_time_ms.js
|
@@ -34,7 +34,7 @@ function forceAggregationToHangAndCheckMaxTimeMsExpires(
|
// Use a short maxTimeMS so that the test completes in a reasonable amount of time. We will
|
// use the 'maxTimeNeverTimeOut' failpoint to ensure that the operation does not prematurely
|
// time out.
|
- const maxTimeMS = 1000 * 2;
|
+ const maxTimeMS = 1000 * 4;
|
|
// Enable a failPoint so that the write will hang.
|
const failpointCommand = {
|
@@ -66,6 +66,8 @@ function forceAggregationToHangAndCheckMaxTimeMsExpires(
|
shellStr += `(${runAggregate.toString()})();`;
|
const awaitShell = startParallelShell(shellStr, conn.port);
|
|
+ sleep(1000);
|
+
|
waitForCurOpByFailPointNoNS(failPointConn.getDB("admin"), failPointName);
|
|
assert.commandWorked(maxTimeMsConn.getDB("admin").runCommand(
|
@@ -73,7 +75,7 @@ function forceAggregationToHangAndCheckMaxTimeMsExpires(
|
|
// The aggregation running in the parallel shell will hang on the failpoint, burning
|
// its time. Wait until the maxTimeMS has definitely expired.
|
- sleep(maxTimeMS + 2000);
|
+ sleep(maxTimeMS + 4000);
|
|
// Now drop the failpoint, allowing the aggregation to proceed. It should hit an
|
// interrupt check and terminate immediately.
|