summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/noPassthroughWithMongod/cursor_server_status_metrics_lifespan_histogram.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/jstests/noPassthroughWithMongod/cursor_server_status_metrics_lifespan_histogram.js b/jstests/noPassthroughWithMongod/cursor_server_status_metrics_lifespan_histogram.js
index d42df06c8d8..6139e2b683e 100644
--- a/jstests/noPassthroughWithMongod/cursor_server_status_metrics_lifespan_histogram.js
+++ b/jstests/noPassthroughWithMongod/cursor_server_status_metrics_lifespan_histogram.js
@@ -20,14 +20,6 @@ function getNumCursorsLessThan30Seconds() {
return db.serverStatus().metrics.cursor.lifespan.lessThan30Seconds;
}
-function getNumCursorsLessThan1Minute() {
- return db.serverStatus().metrics.cursor.lifespan.lessThan1Minute;
-}
-
-function getNumCursorsLessThan10Minutes() {
- return db.serverStatus().metrics.cursor.lifespan.lessThan10Minutes;
-}
-
for (let i = 0; i < 40; i++) {
coll.insert({a: i, b: "field b"});
}
@@ -36,8 +28,6 @@ const initialNumCursorsLt1s = getNumCursorsLessThan1Second();
const initialNumCursorsLt5s = getNumCursorsLessThan5Seconds();
const initialNumCursorsLt15s = getNumCursorsLessThan15Seconds();
const initialNumCursorsLt30s = getNumCursorsLessThan30Seconds();
-const initialNumCursorsLt1m = getNumCursorsLessThan1Minute();
-const initialNumCursorsLt10m = getNumCursorsLessThan10Minutes();
// Since we aren't guaranteed perfect timings, the checks in this test have been relaxed to window
// sizes of 30s. For example, a cursor that is expected to die in under 5s may actually take longer
@@ -63,20 +53,3 @@ for (let i = 0; i < 3; i++) {
}
assert.eq(cursorsDeadSinceStartLt30Seconds(), 4);
-
-const cursorLt1Minute = coll.find().batchSize(2);
-const cursorLt10Minutes = coll.aggregate([], {cursor: {batchSize: 2}});
-cursorLt1Minute.next();
-cursorLt10Minutes.next();
-
-sleep(31000); // Sleep for 31 s.
-while (cursorLt1Minute.hasNext()) {
- cursorLt1Minute.next();
-}
-assert.eq(getNumCursorsLessThan1Minute() - initialNumCursorsLt1m, 1);
-
-sleep(30000); // Sleep another 30s, so the total should be greater than 1m and less than 10m.
-while (cursorLt10Minutes.hasNext()) {
- cursorLt10Minutes.next();
-}
-assert.eq(getNumCursorsLessThan10Minutes() - initialNumCursorsLt10m, 1); \ No newline at end of file