summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishnu K <vishnu.kaushik@mongodb.com>2024-09-10 15:55:35 -0400
committerMongoDB Bot <mongo-bot@mongodb.com>2024-09-10 20:44:44 +0000
commitb41cda4fe697dce6fd9b83b3805362ccc02fbeb3 (patch)
tree9bc6884b4f29ab6dd0f33dc3050c911a8be3292b
parent489dd5a994faf69f600684cc98acd6e5e5c74e91 (diff)
SERVER-93575 make cursor_server_status_metrics_lifespan_histogram.js less flaky [v8.0] (#26524)r8.0.0
GitOrigin-RevId: d7cd03b239ac39a3c7d63f7145e91aca36f93db6
-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