Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Fixed the failed DPB LAG tests
Why I did it
The DPB LAG test was not passing. The test case was meant to cover the race condition scenario where on port removal, port delete arrives at orchagent before lag removal(The dependencies would be removed by breakout command automatically). So port delete should wait until dependencies are removed.
To mimic this, app DB LAG member table should be created first and removed after dpb command. The test was earlier mimicing with cfg DB LAG table (which is not the actual use case). Moreover mimicking config_Db lag table has a race condition where removeLAGMember is called by teamd during link down and thus the flow completes and when actual remove lag member from config_db is called, teamd crashes. This results in further lag remove call to be unhandled leaving residual LAG objects in asic DB failing the tests.
How I verified it
Modifying the tests to operate on top of app DB instead of config DB.
Details if related