From 05204e3051de5222ca9f941a1416fcac110591a5 Mon Sep 17 00:00:00 2001 From: Jasmeet Bagga Date: Fri, 16 Aug 2024 20:56:59 -0700 Subject: [PATCH] Kill unused API checkFabricConnectivityStats Summary: As titled Reviewed By: shri-khare Differential Revision: D61421445 Privacy Context Container: L1125642 fbshipit-source-id: d7df9cb579f0d07494c93ecc4d5796488b652acd --- fboss/agent/test/utils/FabricTestUtils.cpp | 20 -------------------- fboss/agent/test/utils/FabricTestUtils.h | 1 - 2 files changed, 21 deletions(-) diff --git a/fboss/agent/test/utils/FabricTestUtils.cpp b/fboss/agent/test/utils/FabricTestUtils.cpp index f5dd55dfb20df..c8b7f9ed2fbe3 100644 --- a/fboss/agent/test/utils/FabricTestUtils.cpp +++ b/fboss/agent/test/utils/FabricTestUtils.cpp @@ -61,26 +61,6 @@ void checkFabricConnectivity(TestEnsembleIf* ensemble, SwitchID switchId) { }); } -void checkFabricConnectivityStats(TestEnsembleIf* ensemble, SwitchID switchId) { - WITH_RETRIES({ - ensemble->updateStats(); - auto reachability = ensemble->getFabricConnectivity(switchId); - int count = 0; - for (auto [_, endpoint] : reachability) { - if (!*endpoint.isAttached()) { - continue; - } - // all interfaces which have reachability info collected - count++; - } - // expected all of interfaces to jump on mismatched and missing - EXPECT_EVENTUALLY_EQ( - *(ensemble->getFabricReachabilityStats().mismatchCount()), count); - EXPECT_EVENTUALLY_EQ( - *(ensemble->getFabricReachabilityStats().missingCount()), count); - }); -} - void populatePortExpectedNeighbors( const std::vector& ports, cfg::SwitchConfig& cfg) { diff --git a/fboss/agent/test/utils/FabricTestUtils.h b/fboss/agent/test/utils/FabricTestUtils.h index 2253a613bd978..a07bf10067e55 100644 --- a/fboss/agent/test/utils/FabricTestUtils.h +++ b/fboss/agent/test/utils/FabricTestUtils.h @@ -16,7 +16,6 @@ namespace facebook::fboss::utility { void checkFabricConnectivity(TestEnsembleIf* ensemble, SwitchID switchId); -void checkFabricConnectivityStats(TestEnsembleIf* ensemble, SwitchID switchId); void populatePortExpectedNeighbors( const std::vector& ports, cfg::SwitchConfig& cfg);