Fix for SRMulticast
Change-Id: I2e109396873a03412d42b2ca2d13eb7f78d6d654
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.params b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.params
index c9f4f55..4c7946e 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.params
@@ -43,6 +43,10 @@
<mcastSleep>5</mcastSleep>
</timers>
+ <RETRY>
+ <hostDiscovery>10</hostDiscovery>
+ </RETRY>
+
<SCAPY>
<HOSTNAMES>h3v4,h4v4,h8v4,h10v4,h1v6,h3v6</HOSTNAMES>
</SCAPY>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py
index 866b273..8a8ba08 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py
@@ -215,7 +215,7 @@
main.mcastRoutes = { "ipv4": { "src": [ 0 ], "dst": [ 0, 1, 2 ] }, "ipv6": { "src": [ 0 ], "dst": [ 0 ] } }
setupTest( main, test_idx=103, onosNodes=3 )
verifyMcastRoutes( main )
- verifyLinkDown( main, [ "spine103", "spine101" ], 4 )
+ verifyLinkDown( main, [ "spine103", "spine101" ], 2 )
verifyMcastRemoval( main )
lib.cleanup( main, copyKarafLog=False )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py
index b0907d7..8d69443 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py
@@ -146,7 +146,7 @@
if hostsToDiscover:
main.Network.discoverHosts( hostList=hostsToDiscover )
if hostLocations:
- lib.verifyHostLocations( main, hostLocations, retry=5 )
+ lib.verifyHostLocations( main, hostLocations, retry=int( main.params[ "RETRY" ][ "hostDiscovery" ] ) )
for routeName in expectList.keys():
lib.verifyMulticastTraffic( main, routeName, True )
@@ -156,17 +156,19 @@
Reenable the port and verify traffic
"""
from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as lib
+ # Disable the port(s)
main.step( "Disable port {}/{}".format( dpid, port ) )
main.Cluster.active( 0 ).CLI.portstate( dpid=dpid, port=port, state="disable" )
time.sleep( 10 )
for routeName in expectList.keys():
lib.verifyMulticastTraffic( main, routeName, expectList[ routeName ] )
- # Restore the link(s)
+ # Reenable the port(s)
+ main.step( "Enable port {}/{}".format( dpid, port ) )
main.Cluster.active( 0 ).CLI.portstate( dpid=dpid, port=port, state="enable" )
if hostsToDiscover:
main.Network.discoverHosts( hostList=hostsToDiscover )
if hostLocations:
- lib.verifyHostLocations( main, hostLocations, retry=5 )
+ lib.verifyHostLocations( main, hostLocations, retry=int( main.params[ "RETRY" ][ "hostDiscovery" ] ) )
for routeName in expectList.keys():
lib.verifyMulticastTraffic( main, routeName, True )
@@ -184,7 +186,7 @@
# Recover the switch(es)
lib.recoverSwitch( main, switchName, int( main.params[ "TOPO" ][ "switchNum" ] ), int( main.params[ "TOPO" ][ "linkNum" ] ), True if hostsToDiscover else False, hostsToDiscover )
if hostLocations:
- lib.verifyHostLocations( main, hostLocations, retry=5 )
+ lib.verifyHostLocations( main, hostLocations, retry=int( main.params[ "RETRY" ][ "hostDiscovery" ] ) )
for routeName in expectList.keys():
lib.verifyMulticastTraffic( main, routeName, True )