Skip to content
Merged
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
26 changes: 14 additions & 12 deletions tests/bgp/test_bgp_session_flap.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,13 @@ def test_bgp_single_session_flaps(setup):
assert stats[index][0] < (stats[0][0] + cpuSpike)
assert stats[index][1] < (stats[0][1] + cpuSpike)
assert stats[index][2] < (stats[0][2] + cpuSpike)
assert stats[index][3] < (stats[0][3] * memSpike)
assert stats[index][4] < (stats[0][4] * memSpike)
assert stats[index][5] < (stats[0][5] * memSpike)
assert stats[index][6] < (stats[0][6] * memSpike)
assert stats[index][7] < (stats[0][7] * memSpike)
assert stats[index][8] < (stats[0][8] * memSpike)
# Use <= for memory usage comparison because it can be 0 (e.g., No V4 neighbors in V6 topo)
assert stats[index][3] <= (stats[0][3] * memSpike)
assert stats[index][4] <= (stats[0][4] * memSpike)
assert stats[index][5] <= (stats[0][5] * memSpike)
assert stats[index][6] <= (stats[0][6] * memSpike)
assert stats[index][7] <= (stats[0][7] * memSpike)
assert stats[index][8] <= (stats[0][8] * memSpike)

time.sleep(wait_time)

Expand Down Expand Up @@ -215,12 +216,13 @@ def test_bgp_multiple_session_flaps(setup):
assert stats[index][0] < (stats[0][0] + cpuSpike)
assert stats[index][1] < (stats[0][1] + cpuSpike)
assert stats[index][2] < (stats[0][2] + cpuSpike)
assert stats[index][3] < (stats[0][3] * memSpike)
assert stats[index][4] < (stats[0][4] * memSpike)
assert stats[index][5] < (stats[0][5] * memSpike)
assert stats[index][6] < (stats[0][6] * memSpike)
assert stats[index][7] < (stats[0][7] * memSpike)
assert stats[index][8] < (stats[0][8] * memSpike)
# Use <= for memory usage comparison because it can be 0 (e.g., No V4 neighbors in V6 topo)
assert stats[index][3] <= (stats[0][3] * memSpike)
assert stats[index][4] <= (stats[0][4] * memSpike)
assert stats[index][5] <= (stats[0][5] * memSpike)
assert stats[index][6] <= (stats[0][6] * memSpike)
assert stats[index][7] <= (stats[0][7] * memSpike)
assert stats[index][8] <= (stats[0][8] * memSpike)

time.sleep(wait_time)

Expand Down
Loading