Skip to content

Commit

Permalink
Test that we can collect cable length when voq switch is isolated
Browse files Browse the repository at this point in the history
Summary:
As titled. This doesn't work yet, but is expected to work
once CS00012345713 is fixed

Reviewed By: shri-khare, zechengh09

Differential Revision: D60432990

fbshipit-source-id: 8191a9ce489f009c929ff1144aa532fcab7848b0
  • Loading branch information
Jasmeet Bagga authored and facebook-github-bot committed Aug 29, 2024
1 parent 5668ad7 commit d68c2d6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion fboss/agent/test/agent_hw_tests/AgentVoqSwitchTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,11 +822,22 @@ class AgentVoqSwitchWithFabricPortsStartDrained
}
};

TEST_F(AgentVoqSwitchWithFabricPortsStartDrained, assertLocalForwarding) {
TEST_F(
AgentVoqSwitchWithFabricPortsStartDrained,
assertLocalForwardingAndCableLen) {
auto verify = [this]() {
assertPortAndDrainState(cfg::SwitchDrainState::DRAINED);
// Local forwarding should work even when we come up drained
verifyLocalForwarding();
getSw()->updateStats();
WITH_RETRIES({
auto port2Stats = getSw()->getHwPortStats(masterLogicalFabricPortIds());
for (auto portId : masterLogicalFabricPortIds()) {
auto pitr = port2Stats.find(portId);
EXPECT_EVENTUALLY_TRUE(pitr != port2Stats.end());
EXPECT_EVENTUALLY_TRUE(pitr->second.cableLengthMeters().has_value());
}
});
};
verifyAcrossWarmBoots([]() {}, verify);
}
Expand Down

0 comments on commit d68c2d6

Please sign in to comment.