0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-24 00:17:37 +01:00
mongodb/jstests/sharding/test_ftdc_multiservice_format.js
Matt Broadstone 771dabd098 SERVER-81339 Convert ReplSetTest and ShardingTest to modules (#26332)
GitOrigin-RevId: 744aa110a53786b23c62ff53f87a1418b5991e8d
2024-08-20 22:00:49 +00:00

38 lines
1.0 KiB
JavaScript

/*
* Test that verifies getDiagnosticData returns FTDC data using the new format.
*
* @tags: [
* requires_fcv_80,
* ]
*/
import {verifyGetDiagnosticData} from "jstests/libs/ftdc.js";
import {ShardingTest} from "jstests/libs/shardingtest.js";
const setFeatureFlag = {
setParameter: {featureFlagRouterPort: true}
};
var st = new ShardingTest({
embeddedRouter: true,
configShard: true,
shards: 1,
rs: setFeatureFlag,
mongos: setFeatureFlag,
});
const db = st.rs0.getPrimary().getDB("admin");
const data = verifyGetDiagnosticData(db.getSiblingDB("admin"), true, true);
// Check that the new format sections are there.
assert(data.hasOwnProperty("shard"));
assert(data.hasOwnProperty("router"));
assert(data.hasOwnProperty("common"));
assert(data.shard.hasOwnProperty("start"));
assert(data.shard.hasOwnProperty("end"));
assert(data.router.hasOwnProperty("start"));
assert(data.router.hasOwnProperty("end"));
assert(data.common.hasOwnProperty("start"));
assert(data.common.hasOwnProperty("end"));
st.stop();