Skip to content

Commit

Permalink
tests: Check received prefixes before immediately sending dynamic cap…
Browse files Browse the repository at this point in the history
…abilities

If we send capabilities immediately, before receiving an UPDATE message, we end up
with a notification received from the neighbor. Let's wait until we have the fully
converged topology and do the stuff.

Tested locally and can't replicate the failure, let's see how happy is the CI this time.

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Nov 9, 2023
1 parent cc75bdf commit 5cf01b0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ def _bgp_converge():
"gracefulRestart": "advertisedAndReceived",
"longLivedGracefulRestart": "advertisedAndReceived",
},
"addressFamilyInfo": {
"ipv4Unicast": {
"acceptedPrefixCounter": 3,
}
},
"gracefulRestartInfo": {
"nBit": True,
"timers": {
Expand Down Expand Up @@ -116,6 +121,11 @@ def _bgp_check_if_session_not_reset_after_changing_gr_settings():
"gracefulRestart": "advertisedAndReceived",
"longLivedGracefulRestart": "advertisedAndReceived",
},
"addressFamilyInfo": {
"ipv4Unicast": {
"acceptedPrefixCounter": 3,
}
},
"gracefulRestartInfo": {
"nBit": True,
"timers": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ def _bgp_converge():
"neighborCapabilities": {
"dynamic": "advertisedAndReceived",
},
"addressFamilyInfo": {
"ipv4Unicast": {
"acceptedPrefixCounter": 3,
}
},
}
}
return topotest.json_cmp(output, expected)
Expand Down Expand Up @@ -108,6 +113,11 @@ def _bgp_check_if_session_not_reset():
"dynamic": "advertisedAndReceived",
"role": "advertisedAndReceived",
},
"addressFamilyInfo": {
"ipv4Unicast": {
"acceptedPrefixCounter": 3,
}
},
"messageStats": {
"notificationsRecv": 0,
"capabilityRecv": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ def _bgp_converge():
"receivedSoftwareVersion": None,
},
},
"addressFamilyInfo": {
"ipv4Unicast": {
"acceptedPrefixCounter": 3,
}
},
}
}
return topotest.json_cmp(output, expected)
Expand Down Expand Up @@ -129,6 +134,11 @@ def _bgp_software_version():
"receivedSoftwareVersion": rcv,
},
},
"addressFamilyInfo": {
"ipv4Unicast": {
"acceptedPrefixCounter": 3,
}
},
"messageStats": {
"notificationsRecv": 0,
"capabilityRecv": 1,
Expand Down

0 comments on commit 5cf01b0

Please sign in to comment.