Merge "Random fixes for CHOTestMonkey"
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
index 75e95ca..7b07758 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
@@ -248,7 +248,7 @@
startStatus = main.Mininet1.startNet( topoFile = topoPath )
main.mininetSwitches = main.Mininet1.getSwitches()
main.mininetHosts = main.Mininet1.getHosts()
- main.mininetLinks = main.Mininet1.getLinks()
+ main.mininetLinks = main.Mininet1.getLinks( timeout=60 )
utilities.assert_equals( expect=main.TRUE,
actual=startStatus,
onpass="Start Mininet topology test PASS",
diff --git a/TestON/tests/CHOTestMonkey/dependencies/EventGenerator.py b/TestON/tests/CHOTestMonkey/dependencies/EventGenerator.py
index 0811019..dd53238 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/EventGenerator.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/EventGenerator.py
@@ -400,9 +400,7 @@
main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
sleepTime = int( main.params[ 'EVENT' ][ 'installAllHostIntents' ][ 'sleepBeforeCheck' ] )
main.eventScheduler.scheduleEvent( EventType().TEST_SLEEP, EventScheduleMethod().RUN_BLOCK, [ sleepTime ] )
- main.eventScheduler.scheduleEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
- main.eventScheduler.scheduleEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
- main.eventScheduler.scheduleEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
+ self.insertAllChecks( EventScheduleMethod().RUN_NON_BLOCK )
if scheduleMethod == EventScheduleMethod().RUN_BLOCK:
main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
@@ -437,9 +435,7 @@
main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
sleepTime = int( main.params[ 'EVENT' ][ 'removeAllHostIntents' ][ 'sleepBeforeCheck' ] )
main.eventScheduler.scheduleEvent( EventType().TEST_SLEEP, EventScheduleMethod().RUN_BLOCK, [ sleepTime ] )
- main.eventScheduler.scheduleEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
- main.eventScheduler.scheduleEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
- main.eventScheduler.scheduleEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
+ self.insertAllChecks( EventScheduleMethod().RUN_NON_BLOCK )
if scheduleMethod == EventScheduleMethod().RUN_BLOCK:
main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
@@ -474,9 +470,7 @@
main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
sleepTime = int( main.params[ 'EVENT' ][ 'installAllPointIntents' ][ 'sleepBeforeCheck' ] )
main.eventScheduler.scheduleEvent( EventType().TEST_SLEEP, EventScheduleMethod().RUN_BLOCK, [ sleepTime ] )
- main.eventScheduler.scheduleEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
- main.eventScheduler.scheduleEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
- main.eventScheduler.scheduleEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
+ self.insertAllChecks( EventScheduleMethod().RUN_NON_BLOCK )
if scheduleMethod == EventScheduleMethod().RUN_BLOCK:
main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
@@ -511,8 +505,6 @@
main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
sleepTime = int( main.params[ 'EVENT' ][ 'removeAllPointIntents' ][ 'sleepBeforeCheck' ] )
main.eventScheduler.scheduleEvent( EventType().TEST_SLEEP, EventScheduleMethod().RUN_BLOCK, [ sleepTime ] )
- main.eventScheduler.scheduleEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
- main.eventScheduler.scheduleEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
- main.eventScheduler.scheduleEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
+ self.insertAllChecks( EventScheduleMethod().RUN_NON_BLOCK )
if scheduleMethod == EventScheduleMethod().RUN_BLOCK:
main.eventScheduler.scheduleEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
diff --git a/TestON/tests/CHOTestMonkey/dependencies/events/AppEvent.py b/TestON/tests/CHOTestMonkey/dependencies/events/AppEvent.py
index 7f0ca7c..de5fd48 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/events/AppEvent.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/events/AppEvent.py
@@ -194,10 +194,14 @@
controller = main.controllers[ self.CLIIndex - 1 ]
with controller.CLILock:
# TODO: handle the case that multiple hosts attach to one device
+ srcMAC = ""
+ dstMAC = ""
+ if len( self.deviceA.hosts ) > 0:
+ srcMAC = self.deviceA.hosts[ 0 ].mac
+ if len( self.deviceB.hosts ) > 0:
+ dstMAC = self.deviceB.hosts[ 0 ].mac
id = controller.CLI.addPointIntent( self.deviceA.dpid, self.deviceB.dpid,
- 1, 1, '',
- self.deviceA.hosts[ 0 ].mac,
- self.deviceB.hosts[ 0 ].mac )
+ 1, 1, '', srcMAC, dstMAC )
if id == None:
main.log.warn( self.typeString + " - add point intent failed" )
return EventStates().FAIL