blob: ba1035724e6ada07cee94f7ab732fef653131b21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/**
* Tests for the ingress handshake metrics.
*
* @tags: [requires_fcv_70]
*/
(function() {
"use strict";
load('jstests/libs/ingress_handshake_metrics_helpers.js');
let runTest = (connectionHealthLoggingOn) => {
let rootCreds = {user: 'root', pwd: 'root'};
let conn = MongoRunner.runMongod({auth: ''});
jsTestLog("Setting up users and test data.");
let runMetricsTest = ingressHandshakeMetricsTest(conn, {
connectionHealthLoggingOn: connectionHealthLoggingOn,
preAuthDelayMillis: 50,
postAuthDelayMillis: 100,
helloProcessingDelayMillis: 50,
helloResponseDelayMillis: 100,
rootCredentials: rootCreds
});
jsTestLog("Connecting to mongod and running the test.");
runMetricsTest();
MongoRunner.stopMongod(conn, null, rootCreds);
};
// Parameterized on enabling/disabling connection health logging.
runTest(true);
runTest(false);
})();
|