Add sleeps when changing switch mastership
Change-Id: I84491ebe5b432af469027958fb43758e77aec5ce
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index 5707a7c..f5a7dfb 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -139,14 +139,20 @@
links = len( json.loads( main.Cluster.next().links() ) )
switches = len( json.loads( main.Cluster.next().devices() ) )
for ctrl in xrange( numCtrls ):
+ # Kill node
run.killOnos( main, [ ctrl ], switches, links, ( numCtrls - 1 ) )
+ time.sleep( float( main.params[ 'timers' ][ 'SwitchDiscovery' ] ) )
main.Cluster.active(0).CLI.balanceMasters()
+ time.sleep( float( main.params[ 'timers' ][ 'SwitchDiscovery' ] ) )
run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
if countFlowsGroups:
run.checkFlowsGroupsFromFile( main )
+ # Recover node
run.recoverOnos( main, [ ctrl ], switches, links, numCtrls )
+ time.sleep( float( main.params[ 'timers' ][ 'SwitchDiscovery' ] ) )
main.Cluster.active(0).CLI.balanceMasters()
+ time.sleep( float( main.params[ 'timers' ][ 'SwitchDiscovery' ] ) )
run.pingAll( main, 'CASE%03d' % test_idx, acceptableFailed=5, basedOnIp=True )
if countFlowsGroups:
run.checkFlowsGroupsFromFile( main )