Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions fboss/agent/test/link_tests/AgentEnsembleLinkTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,19 @@ class AgentEnsembleLinkTest : public AgentEnsembleTest {

void printProductionFeatures() const;

void updateCablePorts() {
cabledPorts_.clear();
auto swConfig = getSw()->getConfig();

for (const auto& port : *swConfig.ports()) {
if (!(*port.expectedLLDPValues()).empty() ||
!(*port.expectedNeighborReachability()).empty()) {
auto portID = *port.logicalID();
cabledPorts_.emplace_back(portID);
}
}
}

private:
void initializeCabledPorts();
void logLinkDbgMessage(std::vector<PortID>& portIDs) const override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ class AgentEnsembleSpeedChangeTest : public AgentEnsembleLinkTest {
// updated
applyNewConfig(newConfig);

// Speed change may alter the number of logical ports,
// so we need to refresh the cabledPorts_.
updateCablePorts();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave a comment above this line that we need to update cabled ports since the previous speed change may add or remove ports

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

EXPECT_NO_THROW(waitForAllCabledPorts(true, 60, 5s););
createL3DataplaneFlood();
};
Expand Down
Loading