Pinging all hosts multiple times in CASE60
Change-Id: Iaa5cb36a4a3f87d83697053d0ef8c3075f854d4c
diff --git a/TestON/tests/CHOtest/CHOtest.params b/TestON/tests/CHOtest/CHOtest.params
index 4f34b11..590b37f 100644
--- a/TestON/tests/CHOtest/CHOtest.params
+++ b/TestON/tests/CHOtest/CHOtest.params
@@ -94,9 +94,10 @@
</timers>
<TEST>
- <pause_test>off</pause_test>
+ <pauseTest>off</pauseTest>
<email>off</email>
- <intent_check>8</intent_check>
+ <intentChecks>8</intentChecks>
+ <numPings>5</numPings>
</TEST>
</PARAMS>
diff --git a/TestON/tests/CHOtest/CHOtest.py b/TestON/tests/CHOtest/CHOtest.py
index a65bf3c..44f7bc9 100644
--- a/TestON/tests/CHOtest/CHOtest.py
+++ b/TestON/tests/CHOtest/CHOtest.py
@@ -33,9 +33,10 @@
git_branch = main.params[ 'GIT' ][ 'branch' ]
karafTimeout = main.params['CTRL']['karafCliTimeout']
main.checkIntentsDelay = int( main.params['timers']['CheckIntentDelay'] )
- main.failSwitch = main.params['TEST']['pause_test']
+ main.failSwitch = main.params['TEST']['pauseTest']
main.emailOnStop = main.params['TEST']['email']
- main.intentCheck = int( main.params['TEST']['intent_check'] )
+ main.intentCheck = int( main.params['TEST']['intentChecks'] )
+ main.numPings = int( main.params['TEST']['numPings'] )
main.newTopo = ""
main.CLIs = []
@@ -1026,13 +1027,14 @@
onfail="SOME INTENTS NOT INSTALLED" )
main.step( "Verify Ping across all hosts" )
- pingResult = main.FALSE
- time1 = time.time()
- pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
- if not pingResult:
- main.log.warn("First pingall failed. Retrying...")
+ for i in range(main.numPings):
time1 = time.time()
pingResult = main.Mininet1.pingall(timeout=main.pingTimeout)
+ if not pingResult:
+ main.log.warn("First pingall failed. Retrying...")
+ time.sleep(3)
+ else: break
+
time2 = time.time()
timeDiff = round( ( time2 - time1 ), 2 )
main.log.report(