]> git.puffer.fish Git - mirror/frr.git/commit
tests: Do not use peerUptime as a measure of if a clear worked 4758/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 31 Jul 2019 16:29:32 +0000 (12:29 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 31 Jul 2019 16:33:55 +0000 (12:33 -0400)
commitabdb6bcebd273d52f158d8a4f47f3ba4892d40e3
tree50d7f5a3677ac2530ea52fd5b1f21ab80a9e33d7
parent2e6f2d6bc7edb7a75e24d1f8eb15a769d091f64e
tests: Do not use peerUptime as a measure of if a clear worked

The peerUptime data received from a `show bgp ipv4 uni summ json`
gives you the time in seconds since the peer has come up.
The clear_bgp_and_verify function is checking the peerUptime
for before and after and if they are the same then the test
was declaring a clear failure.

The problem with this is of course that the tests can run fast
enough that the peerUptime is the same for before and after the clear.

Modify the test case to use peerUptimeEstablishedEpoch.
This value is the seconds since the epoch since the establishment
of the peer.  This will allow us to know that a clear happened.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
tests/topotests/lib/bgp.py