From 194a588a5790ac1620fe8e9011d8b488c09613d1 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 8 Dec 2022 10:48:14 -0500 Subject: SERVER-71961 Don't expect absent collection ftdc --- jstests/noPassthrough/ftdc_collection_stats.js | 6 +++--- 1 file 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 -- cgit v1.2.1