-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix restoreInitialTopology in SA with multiple SCs #1003
Conversation
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Aïe... thanks |
Signed-off-by: Bertrand Rix <bertrand.rix@artelys.com>
The missing coverage are edge cases very hard to test in a unit test. I feel we can merge as is. |
restoreInitialTopology(lfNetwork, modifiedTopoConfig.getSwitchesToClose(), modifiedTopoConfig.getBranchIdsToClose()); | ||
restoreInitialTopology(lfNetwork, switchAndBranchIdsLeftToClose); | ||
} | ||
if (!switchAndBranchIdsLeftToClose.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we could be in that case (with the exception). If we are in that case, it means that we have a bug in the code. Any advice @geofjamg ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either:
- we are able to add a test case for this case because it is a real case
- we remove the code because it cannot happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a real case, I just put it to be sure that we would catch a bug if it happened. I will remove this bit of code.
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Quality Gate passedIssues Measures |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
When restoring the initial topology in SA, we try to close switches/branches in all LfNetworks. When we have more than 1 LfNetwork, the code crashes.
What is the new behavior (if this is a feature change)?
We will be able to restore the initial topology in SA with multiple SCs.
Does this PR introduce a breaking change or deprecate an API?