Merge pull request #105 from opennetworkinglab/devl/apps
Fix some typos in HA Tests
diff --git a/TestON/tests/HATestClusterRestart/HATestClusterRestart.py b/TestON/tests/HATestClusterRestart/HATestClusterRestart.py
index 475da9a..1205b11 100644
--- a/TestON/tests/HATestClusterRestart/HATestClusterRestart.py
+++ b/TestON/tests/HATestClusterRestart/HATestClusterRestart.py
@@ -298,13 +298,15 @@
roleCall = roleCall and main.ONOScli1.deviceRole( deviceId,
ip )
# Check assignment
- if ip in main.ONOScli1.getRole( deviceId ).get( 'master' ):
+ master = main.ONOScli1.getRole( deviceId ).get( 'master' )
+ if ip in master:
roleCheck = roleCheck and main.TRUE
else:
roleCheck = roleCheck and main.FALSE
main.log.error( "Error, controller " + ip + " is not" +
" master " + "of device " +
- str( deviceId ) )
+ str( deviceId ) + ". Master is " +
+ repr( master ) + "." )
except ( AttributeError, AssertionError ):
main.log.exception( "Something is wrong with ONOS device view" )
main.log.info( main.ONOScli1.devices() )
@@ -572,6 +574,8 @@
onpass="ECM anti-entropy for intents worked within " +
"expected time",
onfail="Intent ECM anti-entropy took too long" )
+ if gossipTime <= 30:
+ intentAddResult = True
if not intentAddResult or "key" in pendingMap:
import time
diff --git a/TestON/tests/HATestMinorityRestart/HATestMinorityRestart.py b/TestON/tests/HATestMinorityRestart/HATestMinorityRestart.py
index bc9e69a..43dd995 100644
--- a/TestON/tests/HATestMinorityRestart/HATestMinorityRestart.py
+++ b/TestON/tests/HATestMinorityRestart/HATestMinorityRestart.py
@@ -298,13 +298,15 @@
roleCall = roleCall and main.ONOScli1.deviceRole( deviceId,
ip )
# Check assignment
- if ip in main.ONOScli1.getRole( deviceId ).get( 'master' ):
+ master = main.ONOScli1.getRole( deviceId ).get( 'master' )
+ if ip in master:
roleCheck = roleCheck and main.TRUE
else:
roleCheck = roleCheck and main.FALSE
main.log.error( "Error, controller " + ip + " is not" +
" master " + "of device " +
- str( deviceId ) )
+ str( deviceId ) + ". Master is " +
+ repr( master ) + "." )
except ( AttributeError, AssertionError ):
main.log.exception( "Something is wrong with ONOS device view" )
main.log.info( main.ONOScli1.devices() )
@@ -570,6 +572,8 @@
onpass="ECM anti-entropy for intents worked within " +
"expected time",
onfail="Intent ECM anti-entropy took too long" )
+ if gossipTime <= 30:
+ intentAddResult = True
if not intentAddResult or "key" in pendingMap:
import time
diff --git a/TestON/tests/HATestSanity/HATestSanity.py b/TestON/tests/HATestSanity/HATestSanity.py
index 7ce12b8..20f6cc8 100644
--- a/TestON/tests/HATestSanity/HATestSanity.py
+++ b/TestON/tests/HATestSanity/HATestSanity.py
@@ -298,7 +298,7 @@
roleCall = roleCall and main.ONOScli1.deviceRole( deviceId,
ip )
# Check assignment
- master = main.ONOScli1.getRole( deviceId ).get( 'master' ):
+ master = main.ONOScli1.getRole( deviceId ).get( 'master' )
if ip in master:
roleCheck = roleCheck and main.TRUE
else:
diff --git a/TestON/tests/HATestSingleInstanceRestart/HATestSingleInstanceRestart.py b/TestON/tests/HATestSingleInstanceRestart/HATestSingleInstanceRestart.py
index b3894b7..d2f0bc9 100644
--- a/TestON/tests/HATestSingleInstanceRestart/HATestSingleInstanceRestart.py
+++ b/TestON/tests/HATestSingleInstanceRestart/HATestSingleInstanceRestart.py
@@ -237,13 +237,15 @@
roleCall = roleCall and main.ONOScli1.deviceRole( deviceId,
ip )
# Check assignment
- if ip in main.ONOScli1.getRole( deviceId ).get( 'master' ):
+ master = main.ONOScli1.getRole( deviceId ).get( 'master' )
+ if ip in master:
roleCheck = roleCheck and main.TRUE
else:
roleCheck = roleCheck and main.FALSE
main.log.error( "Error, controller " + ip + " is not" +
" master " + "of device " +
- str( deviceId ) )
+ str( deviceId ) + ". Master is " +
+ repr( master ) + "." )
except ( AttributeError, AssertionError ):
main.log.exception( "Something is wrong with ONOS device view" )
main.log.info( main.ONOScli1.devices() )