tests: tweak timers to avoid frequent failures on slow CI hardware

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
This commit is contained in:
Jafar Al-Gharaibeh 2024-07-10 14:18:51 -05:00
parent ebf05b4ee1
commit ad7a1f9487
14 changed files with 32 additions and 134 deletions

View File

@ -8,18 +8,18 @@ interface r1-eth0
ip address 10.0.1.1/24 ip address 10.0.1.1/24
ip ospf cost 100 ip ospf cost 100
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface r1-eth1 vrf blue interface r1-eth1 vrf blue
ip address 10.0.10.1/24 ip address 10.0.10.1/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
! !
interface r1-eth2 vrf green interface r1-eth2 vrf green
ip address 10.0.91.1/24 ip address 10.0.91.1/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
! !
router ospf router ospf

View File

@ -2,32 +2,15 @@
"10.0.94.0/24":[ "10.0.94.0/24":[
{ {
"prefix":"10.0.94.0/24", "prefix":"10.0.94.0/24",
"prefixLen":24,
"protocol":"bgp", "protocol":"bgp",
"vrfName":"green", "vrfName":"green",
"selected":true,
"destSelected":true,
"distance":20,
"metric":34, "metric":34,
"installed":true, "installed":true,
"table":12,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":"*",
"installedNexthopGroupId":"*",
"uptime":"*",
"nexthops":[ "nexthops":[
{ {
"flags":3,
"fib":true,
"ip":"10.0.10.5", "ip":"10.0.10.5",
"afi":"ipv4",
"interfaceName":"r1-eth1", "interfaceName":"r1-eth1",
"vrf":"blue", "vrf":"blue"
"active":true,
"weight":1
} }
] ]
} }

View File

@ -2,32 +2,15 @@
"10.0.94.0/24":[ "10.0.94.0/24":[
{ {
"prefix":"10.0.94.0/24", "prefix":"10.0.94.0/24",
"prefixLen":24,
"protocol":"bgp", "protocol":"bgp",
"vrfName":"green", "vrfName":"green",
"selected":true,
"destSelected":true,
"distance":20,
"metric":136, "metric":136,
"installed":true, "installed":true,
"table":12,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":"*",
"installedNexthopGroupId":"*",
"uptime":"*",
"nexthops":[ "nexthops":[
{ {
"flags":3,
"fib":true,
"ip":"10.0.1.2", "ip":"10.0.1.2",
"afi":"ipv4",
"interfaceName":"r1-eth0", "interfaceName":"r1-eth0",
"vrf":"default", "vrf":"default"
"active":true,
"weight":1
} }
] ]
} }

View File

@ -2,32 +2,15 @@
"10.0.94.0/24":[ "10.0.94.0/24":[
{ {
"prefix":"10.0.94.0/24", "prefix":"10.0.94.0/24",
"prefixLen":24,
"protocol":"bgp", "protocol":"bgp",
"vrfName":"green", "vrfName":"green",
"selected":true,
"destSelected":true,
"distance":20,
"metric":1138, "metric":1138,
"installed":true, "installed":true,
"table":12,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":"*",
"installedNexthopGroupId":"*",
"uptime":"*",
"nexthops":[ "nexthops":[
{ {
"flags":3,
"fib":true,
"ip":"10.0.1.2", "ip":"10.0.1.2",
"afi":"ipv4",
"interfaceName":"r1-eth0", "interfaceName":"r1-eth0",
"vrf":"default", "vrf":"default"
"active":true,
"weight":1
} }
] ]
} }

View File

@ -2,32 +2,15 @@
"10.0.94.0/24":[ "10.0.94.0/24":[
{ {
"prefix":"10.0.94.0/24", "prefix":"10.0.94.0/24",
"prefixLen":24,
"protocol":"bgp", "protocol":"bgp",
"vrfName":"green", "vrfName":"green",
"selected":true,
"destSelected":true,
"distance":20,
"metric":1218, "metric":1218,
"installed":true, "installed":true,
"table":12,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":"*",
"installedNexthopGroupId":"*",
"uptime":"*",
"nexthops":[ "nexthops":[
{ {
"flags":3,
"fib":true,
"ip":"10.0.1.2", "ip":"10.0.1.2",
"afi":"ipv4",
"interfaceName":"r1-eth0", "interfaceName":"r1-eth0",
"vrf":"default", "vrf":"default"
"active":true,
"weight":1
} }
] ]
} }

View File

@ -2,32 +2,15 @@
"10.0.94.0/24":[ "10.0.94.0/24":[
{ {
"prefix":"10.0.94.0/24", "prefix":"10.0.94.0/24",
"prefixLen":24,
"protocol":"bgp", "protocol":"bgp",
"vrfName":"green", "vrfName":"green",
"selected":true,
"destSelected":true,
"distance":20,
"metric":238, "metric":238,
"installed":true, "installed":true,
"table":12,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":"*",
"installedNexthopGroupId":"*",
"uptime":"*",
"nexthops":[ "nexthops":[
{ {
"flags":3,
"fib":true,
"ip":"10.0.1.2", "ip":"10.0.1.2",
"afi":"ipv4",
"interfaceName":"r1-eth0", "interfaceName":"r1-eth0",
"vrf":"default", "vrf":"default"
"active":true,
"weight":1
} }
] ]
} }

View File

@ -2,32 +2,15 @@
"10.0.94.0/24":[ "10.0.94.0/24":[
{ {
"prefix":"10.0.94.0/24", "prefix":"10.0.94.0/24",
"prefixLen":24,
"protocol":"bgp", "protocol":"bgp",
"vrfName":"green", "vrfName":"green",
"selected":true,
"destSelected":true,
"distance":20,
"metric":136, "metric":136,
"installed":true, "installed":true,
"table":12,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":1,
"internalNextHopActiveNum":1,
"nexthopGroupId":"*",
"installedNexthopGroupId":"*",
"uptime":"*",
"nexthops":[ "nexthops":[
{ {
"flags":3,
"fib":true,
"ip":"10.0.10.5", "ip":"10.0.10.5",
"afi":"ipv4",
"interfaceName":"r1-eth1", "interfaceName":"r1-eth1",
"vrf":"blue", "vrf":"blue"
"active":true,
"weight":1
} }
] ]
} }

View File

@ -8,18 +8,18 @@ interface r2-eth0
ip address 10.0.1.2/24 ip address 10.0.1.2/24
ip ospf cost 100 ip ospf cost 100
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface r2-eth1 vrf blue interface r2-eth1 vrf blue
ip address 10.0.20.2/24 ip address 10.0.20.2/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface r2-eth2 vrf green interface r2-eth2 vrf green
ip address 10.0.70.2/24 ip address 10.0.70.2/24
ip ospf cost 1000 ip ospf cost 1000
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
router ospf router ospf
ospf router-id 10.0.255.2 ospf router-id 10.0.255.2

View File

@ -8,18 +8,18 @@ interface r3-eth0
ip address 10.0.3.3/24 ip address 10.0.3.3/24
ip ospf cost 100 ip ospf cost 100
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface r3-eth1 vrf blue interface r3-eth1 vrf blue
ip address 10.0.30.3/24 ip address 10.0.30.3/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface r3-eth2 vrf green interface r3-eth2 vrf green
ip address 10.0.80.3/24 ip address 10.0.80.3/24
ip ospf cost 1000 ip ospf cost 1000
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
router ospf router ospf
ospf router-id 10.0.255.3 ospf router-id 10.0.255.3

View File

@ -8,17 +8,17 @@ interface r4-eth0
ip address 10.0.3.4/24 ip address 10.0.3.4/24
ip ospf cost 100 ip ospf cost 100
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface r4-eth1 vrf blue interface r4-eth1 vrf blue
ip address 10.0.40.4/24 ip address 10.0.40.4/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface r4-eth2 vrf green interface r4-eth2 vrf green
ip address 10.0.94.4/24 ip address 10.0.94.4/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
router ospf router ospf
ospf router-id 10.0.255.4 ospf router-id 10.0.255.4

View File

@ -7,17 +7,17 @@ ip forwarding
interface ra-eth0 interface ra-eth0
ip address 10.0.50.5/24 ip address 10.0.50.5/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface ra-eth1 interface ra-eth1
ip address 10.0.10.5/24 ip address 10.0.10.5/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface ra-eth2 interface ra-eth2
ip address 10.0.20.5/24 ip address 10.0.20.5/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
router ospf router ospf
ospf router-id 10.0.255.5 ospf router-id 10.0.255.5

View File

@ -7,17 +7,17 @@ ip forwarding
interface rb-eth0 interface rb-eth0
ip address 10.0.50.6/24 ip address 10.0.50.6/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface rb-eth1 interface rb-eth1
ip address 10.0.30.6/24 ip address 10.0.30.6/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface rb-eth2 interface rb-eth2
ip address 10.0.40.6/24 ip address 10.0.40.6/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
router ospf router ospf
ospf router-id 10.0.255.6 ospf router-id 10.0.255.6

View File

@ -7,12 +7,12 @@ ip forwarding
interface rc-eth0 interface rc-eth0
ip address 10.0.70.7/24 ip address 10.0.70.7/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
interface rc-eth1 interface rc-eth1
ip address 10.0.80.7/24 ip address 10.0.80.7/24
ip ospf hello-interval 1 ip ospf hello-interval 1
ip ospf dead-interval 30 ip ospf dead-interval 40
! !
router ospf router ospf
ospf router-id 10.0.255.7 ospf router-id 10.0.255.7

View File

@ -282,7 +282,7 @@ def test_link_1_2_3_4_down():
assert result is None, assertmsg assert result is None, assertmsg
def test_link_1_2_4_down(): def test_link_1_2_4_down_3_up():
"Test path R1 -> R2 -> Rc -> R3 -> R4" "Test path R1 -> R2 -> Rc -> R3 -> R4"
tgen = get_topogen() tgen = get_topogen()
@ -304,7 +304,7 @@ def test_link_1_2_4_down():
assert result is None, assertmsg assert result is None, assertmsg
def test_link_1_4_down(): def test_link_1_4_down_2_up():
"Test path R1 -> R2 -> Ra -> Rb -> R3 -> R4" "Test path R1 -> R2 -> Ra -> Rb -> R3 -> R4"
tgen = get_topogen() tgen = get_topogen()
@ -320,13 +320,13 @@ def test_link_1_4_down():
test_func = partial( test_func = partial(
topotest.router_json_cmp, r1, "show ip route vrf green 10.0.94.2 json", expected topotest.router_json_cmp, r1, "show ip route vrf green 10.0.94.2 json", expected
) )
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1) _, result = topotest.run_and_expect(test_func, None, count=120, wait=2)
assertmsg = "r1 JSON output mismatches" assertmsg = "r1 JSON output mismatches"
assert result is None, assertmsg assert result is None, assertmsg
def test_link_4_down(): def test_link_4_down_1_up():
"Test path R1 -> Ra -> Rb -> R3 -> R4" "Test path R1 -> Ra -> Rb -> R3 -> R4"
tgen = get_topogen() tgen = get_topogen()
@ -342,7 +342,7 @@ def test_link_4_down():
test_func = partial( test_func = partial(
topotest.router_json_cmp, r1, "show ip route vrf green 10.0.94.2 json", expected topotest.router_json_cmp, r1, "show ip route vrf green 10.0.94.2 json", expected
) )
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1) _, result = topotest.run_and_expect(test_func, None, count=120, wait=2)
assertmsg = "r1 JSON output mismatches" assertmsg = "r1 JSON output mismatches"
assert result is None, assertmsg assert result is None, assertmsg
@ -364,7 +364,7 @@ def test_link_1_2_3_4_up():
test_func = partial( test_func = partial(
topotest.router_json_cmp, r1, "show ip route vrf green 10.0.94.2 json", expected topotest.router_json_cmp, r1, "show ip route vrf green 10.0.94.2 json", expected
) )
_, result = topotest.run_and_expect(test_func, None, count=60, wait=1) _, result = topotest.run_and_expect(test_func, None, count=120, wait=2)
assertmsg = "r1 JSON output mismatches" assertmsg = "r1 JSON output mismatches"
assert result is None, assertmsg assert result is None, assertmsg