summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Evans <jacob.evans@10gen.com>2022-12-08 10:48:14 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-12-08 20:42:33 +0000
commit194a588a5790ac1620fe8e9011d8b488c09613d1 (patch)
tree1359117c53e0e756e00d8b5f2745a29af223628a
parent84cb06c4dba20c297793de801dd1010271c7782e (diff)
downloadmongo-194a588a5790ac1620fe8e9011d8b488c09613d1.tar.gz
SERVER-71961 Don't expect absent collection ftdc
-rw-r--r--jstests/noPassthrough/ftdc_collection_stats.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/noPassthrough/ftdc_collection_stats.js b/jstests/noPassthrough/ftdc_collection_stats.js
index 1391b31c0d4..922ad7b5468 100644
--- a/jstests/noPassthrough/ftdc_collection_stats.js
+++ b/jstests/noPassthrough/ftdc_collection_stats.js
@@ -32,7 +32,8 @@ assert.commandFailed(setParameter(adminDb, {"diagnosticDataCollectionStatsNamesp
assert.eq(getParameter(adminDb, "diagnosticDataCollectionStatsNamespaces"), ["local.startup_log"]);
-// Validate that collection stats are collected for runtime collections
+// Validate that collection stats are collected for runtime collections and that we do not crash
+// for a non-existent collection
assert.commandWorked(setParameter(
adminDb,
{"diagnosticDataCollectionStatsNamespaces": ["admin.system.version", "admin.does_not_exist"]}));
@@ -41,8 +42,7 @@ assert.soon(() => {
jsTestLog("Collected: " + tojson(result));
let collectionStats = result.data.collectionStats;
return collectionStats.hasOwnProperty("admin.system.version") &&
- collectionStats["admin.system.version"].ns == "admin.system.version" &&
- collectionStats["admin.does_not_exist"].ns == "admin.does_not_exist" != undefined;
+ collectionStats["admin.system.version"].ns == "admin.system.version";
});
// Validate that when it is disabled, we stop collecting