summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/slow_session_workflow_log.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/slow_session_workflow_log.js')
-rw-r--r--jstests/noPassthrough/slow_session_workflow_log.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/jstests/noPassthrough/slow_session_workflow_log.js b/jstests/noPassthrough/slow_session_workflow_log.js
index aa4c131ffd2..4a1788a1270 100644
--- a/jstests/noPassthrough/slow_session_workflow_log.js
+++ b/jstests/noPassthrough/slow_session_workflow_log.js
@@ -52,7 +52,7 @@ function runTest(conn) {
coll.find().toArray();
fp.off();
let logAndCount = getSlowLogAndCount(conn);
- const slowSessionWorkflowCount = logAndCount.count;
+ let slowSessionWorkflowCount = logAndCount.count;
assert.gt(slowSessionWorkflowCount,
prevSlowSessionWorkflowCount,
"Expected to find at least one slow SessionWorkflow log.");
@@ -70,6 +70,20 @@ function runTest(conn) {
assert.gte(sendResponseElapsed,
sleepMillisInSendResponse,
"The time reported sending a response didn't include the sleep in the failpoint.");
+
+ assert.commandWorked(
+ conn.adminCommand({setParameter: 1, enableDetailedConnectionHealthMetricLogLines: false}));
+ assert.commandWorked(conn.adminCommand({clearLog: 'global'}));
+
+ // Wait, then do a query beyond the 100ms threshold. Make sure the slow loop log line does not
+ // exist this time.
+ const fp2 = configureFailPoint(
+ conn, "sessionWorkflowDelaySendMessage", {millis: sleepMillisInSendResponse});
+ coll.find().toArray();
+ fp2.off();
+ logAndCount = getSlowLogAndCount(conn);
+ slowSessionWorkflowCount = logAndCount.count;
+ assert.eq(slowSessionWorkflowCount, 0);
}
// Test standalone.