diff options
Diffstat (limited to 'jstests/aggregation/bugs/cursor_timeout.js')
-rw-r--r-- | jstests/aggregation/bugs/cursor_timeout.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/aggregation/bugs/cursor_timeout.js b/jstests/aggregation/bugs/cursor_timeout.js index e9b80b0597f..7664ecc54e4 100644 --- a/jstests/aggregation/bugs/cursor_timeout.js +++ b/jstests/aggregation/bugs/cursor_timeout.js @@ -40,6 +40,10 @@ const batchSize = 2; const numMatches = 5; function assertCursorTimesOut(collName, pipeline) { + // Cursor timeout only occurs outside of sessions. Otherwise we rely on the session timeout + // mechanism to kill cursors. + TestData.disableImplicitSessions = true; + const res = assert.commandWorked(testDB.runCommand({ aggregate: collName, pipeline: pipeline, @@ -71,6 +75,8 @@ function assertCursorTimesOut(collName, pipeline) { cursor.itcount(); }); assert.eq(ErrorCodes.CursorNotFound, err.code, tojson(err)); + + TestData.disableImplicitSessions = false; } assert.commandWorked(testDB.source.insert({local: 1})); |