diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
index 97a432a..a3c7540 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
@@ -1,14 +1,20 @@
 
-def checkRouteNum( main, routeNumExpected, ONOScli = "ONOScli1" ):
+def checkRouteNum( main, routeNumExpected, ONOScli="ONOScli1" ):
+    import time
     main.step( "Check routes installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Route number expected:" )
     main.log.info( routeNumExpected )
     main.log.info( "Route number from ONOS CLI:" )
 
     if ONOScli == "ONOScli1":
-        routeNumActual = main.ONOScli1.ipv4RouteNumber()
+        cli = main.ONOScli1
     else:
-        routeNumActual = main.ONOScli2.ipv4RouteNumber()
+        cli = main.ONOScli2
+    routeNumActual = cli.ipv4RouteNumber()
+    if routeNumActual != routeNumExpected:
+        time.sleep( wait )
+        routeNumActual = cli.ipv4RouteNumber()
 
     main.log.info( routeNumActual )
     utilities.assertEquals( \
@@ -17,17 +23,24 @@
         onfail = "Route number is wrong!" )
 
 def checkM2SintentNum( main, intentNumExpected, ONOScli = "ONOScli1" ):
+    import time
     main.step( "Check M2S intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     if ONOScli == "ONOScli1":
-        jsonResult = main.ONOScli1.intents( jsonFormat = True, summary = True,
-                                            TYPE = "multiPointToSinglePoint" )
+        cli = main.ONOScli1
     else:
-        jsonResult = main.ONOScli2.intents( jsonFormat = True, summary = True,
-                                            TYPE = "multiPointToSinglePoint" )
+        cli = main.ONOScli2
+    jsonResult = cli.intents( jsonFormat = True, summary = True,
+                              TYPE = "multiPointToSinglePoint" )
     intentNumActual = jsonResult['installed']
+    if intentNumActual != intentNumExpected:
+        time.sleep( wait )
+        jsonResult = cli.intents( jsonFormat = True, summary = True,
+                                  TYPE = "multiPointToSinglePoint" )
+        intentNumActual = jsonResult['installed']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -35,17 +48,25 @@
         onfail = "M2S intent number is wrong!" )
 
 def checkP2PintentNum( main, intentNumExpected, ONOScli = "ONOScli1" ):
+    import time
     main.step( "Check P2P intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     if ONOScli == "ONOScli1":
-        jsonResult = main.ONOScli1.intents( jsonFormat = True, summary = True,
-                                            TYPE = "pointToPoint" )
+        cli = main.ONOScli1
     else:
-        jsonResult = main.ONOScli2.intents( jsonFormat = True, summary = True,
-                                            TYPE = "pointToPoint" )
+        cli = main.ONOScli2
+    jsonResult = cli.intents( jsonFormat = True, summary = True,
+                              TYPE = "pointToPoint" )
     intentNumActual = jsonResult['installed']
+
+    if intentNumActual != intentNumExpected:
+        time.sleep( wait )
+        jsonResult = cli.intents( jsonFormat = True, summary = True,
+                                  TYPE = "pointToPoint" )
+        intentNumActual = jsonResult['installed']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -53,11 +74,16 @@
         onfail = "P2P intent number is wrong!" )
 
 def checkFlowNum( main, switch, flowNumExpected ):
+    import time
     main.step( "Check flow entry number in " + switch )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Flow number expected:" )
     main.log.info( flowNumExpected )
     main.log.info( "Flow number actual:" )
     flowNumActual = main.Mininet.getSwitchFlowCount( switch )
+    if flowNumActual != flowNumExpected :
+        time.sleep( wait )
+        flowNumActual = main.Mininet.getSwitchFlowCount( switch )
     main.log.info( flowNumActual )
     utilities.assertEquals( \
         expect = flowNumExpected, actual = flowNumActual,
@@ -121,7 +147,8 @@
         * expectAllSuccess - boolean indicating if you expect all results
         succeed if True, otherwise expect all results fail if False
     """
-    main.step( "Check ping between each host pair" )
+    main.step( "Check ping between each host pair, expect all to succede=" +
+               str( expectAllSuccess ) )
     if len( hosts ) == 0:
         main.log.error( "Parameter hosts can not be empty." )
         main.cleanup()
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
index 8124dfe..a36059e 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
@@ -2,10 +2,11 @@
 
     <testcases>101, 100, 200, 102, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12</testcases>
     # case6 needs a new driver, will enable it after this new driver
-    #<testcases>101, 100, 200, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12</testcases>
+    #101, 100, 200, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
     #Environment variables
     <ENV>
-        <cellName>sdnip_multiple_instance_VM</cellName>
+        <cellName>SDNIP</cellName>
+        <appString>drivers,openflow,proxyarp</appString>
     </ENV>
 
     <CTRL>
@@ -19,16 +20,6 @@
         <port1>6653</port1>
     </CTRL>
 
-    <GIT>
-        <branch1>master</branch1>
-        <branch2>onos-1.3</branch2>
-    </GIT>
-
-    <JSON>
-        <prefix>prefix</prefix>
-        <nextHop>nextHop</nextHop>
-    </JSON>
-
     <DEPENDENCY>
         <path>/USECASE_SdnipFunctionCluster_fsfw/Dependency/</path>
         <topology>USECASE_SdnipI2MN_Cluster.py</topology>
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
index 782110c..98c28bb 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
@@ -5,12 +5,10 @@
         self.default = ''
         global branchName
 
-    # This case is to setup Mininet testbed
     def CASE100( self, main ):
         """
             Start mininet
         """
-        import os
         import imp
         main.log.case( "Setup the Mininet testbed" )
         main.dependencyPath = main.testDir + \
@@ -19,11 +17,11 @@
 
         main.step( "Starting Mininet Topology" )
         topology = main.dependencyPath + main.topology
-        topoResult = main.Mininet.startNet( topoFile = topology )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = topoResult,
-                                 onpass = "Successfully loaded topology",
-                                 onfail = "Failed to load topology" )
+        topoResult = main.Mininet.startNet( topoFile=topology )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=topoResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
         # Exit if topology did not load properly
         if not topoResult:
             main.cleanup()
@@ -34,12 +32,12 @@
         for i in range ( 1, int( main.params['config']['switchNum'] ) + 1 ):
             sw = "sw%s" % ( i )
             swResult = swResult and main.Mininet.assignSwController( sw, fsfwIp,
-                                                                     port = fsfwPort )
+                                                                     port=fsfwPort )
 
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = swResult,
-                             onpass = "Successfully connect all switches to FSFW",
-                             onfail = "Failed to connect all switches to FSFW" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=swResult,
+                                 onpass="Successfully connect all switches to FSFW",
+                                 onfail="Failed to connect all switches to FSFW" )
         if not swResult:
             main.cleanup()
             main.exit()
@@ -69,6 +67,7 @@
         ONOS1Ip = os.getenv( main.params[ 'CTRL' ][ 'ip1' ] )
         ONOS2Ip = os.getenv( main.params[ 'CTRL' ][ 'ip2' ] )
         ONOS3Ip = os.getenv( main.params[ 'CTRL' ][ 'ip3' ] )
+        ipList = [ ONOS1Ip, ONOS2Ip, ONOS3Ip ]
 
         global pr64514
         global pr64515
@@ -82,18 +81,24 @@
         fsfwIp = main.params[ 'CTRL' ][ 'fsfwIp' ]
         fsfwPort = main.params[ 'CTRL' ][ 'fsfwPort' ]
 
+        main.step( "Create cell file" )
+        cellAppString = main.params[ 'ENV' ][ 'appString' ]
+        main.ONOSbench.createCellFile( main.ONOSbench.ip_address, cellName,
+                                       main.Mininet.ip_address,
+                                       cellAppString, ipList )
+
         main.step( "Applying cell variable to environment" )
         cellResult = main.ONOSbench.setCell( cellName )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = cellResult,
-                                 onpass = "Set cell succeeded",
-                                 onfail = "Set cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cellResult,
+                                 onpass="Set cell succeeded",
+                                 onfail="Set cell failed" )
 
         verifyResult = main.ONOSbench.verifyCell()
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = verifyResult,
-                                 onpass = "Verify cell succeeded",
-                                 onfail = "Verify cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=verifyResult,
+                                 onpass="Verify cell succeeded",
+                                 onfail="Verify cell failed" )
 
         branchName = main.ONOSbench.getBranchName()
         main.log.report( "ONOS is on branch: " + branchName )
@@ -102,92 +107,105 @@
         uninstallResult = main.ONOSbench.onosUninstall( ONOS1Ip ) \
                           and main.ONOSbench.onosUninstall( ONOS2Ip ) \
                           and main.ONOSbench.onosUninstall( ONOS3Ip )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = uninstallResult,
-                                 onpass = "Uninstall ONOS from nodes succeeded",
-                                 onfail = "Uninstall ONOS form nodes failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=uninstallResult,
+                                 onpass="Uninstall ONOS from nodes succeeded",
+                                 onfail="Uninstall ONOS form nodes failed" )
 
-        main.ONOSbench.getVersion( report = True )
+        main.ONOSbench.getVersion( report=True )
 
         main.step( "Creating ONOS package" )
-        packageResult = main.ONOSbench.onosPackage( opTimeout = 500 )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = packageResult,
-                                 onpass = "Package ONOS succeeded",
-                                 onfail = "Package ONOS failed" )
+        packageResult = main.ONOSbench.onosPackage( opTimeout=500 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=packageResult,
+                                 onpass="Package ONOS succeeded",
+                                 onfail="Package ONOS failed" )
 
         main.step( "Installing ONOS package" )
-        onos1InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS1Ip )
-        onos2InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS2Ip )
-        onos3InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS3Ip )
+        onos1InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS1Ip )
+        onos2InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS2Ip )
+        onos3InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS3Ip )
         onosInstallResult = onos1InstallResult and onos2InstallResult \
                             and onos3InstallResult
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onosInstallResult,
-                                 onpass = "Install ONOS to nodes succeeded",
-                                 onfail = "Install ONOS to nodes failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onosInstallResult,
+                                 onpass="Install ONOS to nodes succeeded",
+                                 onfail="Install ONOS to nodes failed" )
 
         main.step( "Checking if ONOS is up yet" )
-        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout = 420 )
-        onos2UpResult = main.ONOSbench.isup( ONOS2Ip, timeout = 420 )
-        onos3UpResult = main.ONOSbench.isup( ONOS3Ip, timeout = 420 )
+        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
+        onos2UpResult = main.ONOSbench.isup( ONOS2Ip, timeout=420 )
+        onos3UpResult = main.ONOSbench.isup( ONOS3Ip, timeout=420 )
         onosUpResult = onos1UpResult and onos2UpResult and onos3UpResult
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onos1UpResult and onosUpResult,
-                                 onpass = "ONOS nodes are up",
-                                 onfail = "ONOS nodes are NOT up" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onosUpResult,
+                                 onpass="ONOS nodes are up",
+                                 onfail="ONOS nodes are NOT up" )
 
         main.step( "Checking if ONOS CLI is ready" )
+        main.CLIs = []
         cliResult1 = main.ONOScli1.startOnosCli( ONOS1Ip,
-                commandlineTimeout = 100, onosStartTimeout = 600 )
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli1 )
         cliResult2 = main.ONOScli2.startOnosCli( ONOS2Ip,
-                commandlineTimeout = 100, onosStartTimeout = 600 )
-        cliResult = cliResult1 and cliResult2
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = cliResult,
-                                 onpass = "ONOS CLI (on node1) is ready",
-                                 onfail = "ONOS CLI (on node1) ready" )
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli2 )
+        cliResult3 = main.ONOScli3.startOnosCli( ONOS3Ip,
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli3 )
+        cliResult = cliResult1 and cliResult2 and cliResult3
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cliResult,
+                                 onpass="ONOS CLIs are ready",
+                                 onfail="ONOS CLIs are not ready" )
 
-        caseResult = ( cellResult and verifyResult and
-                       packageResult and
-                       onosInstallResult and onosUpResult and cliResult )
+        for i in range( 10 ):
+            ready = True
+            for cli in main.CLIs:
+                output = cli.summary()
+                if not output:
+                    ready = False
+            if ready:
+                break
+            time.sleep( 30 )
+        utilities.assert_equals( expect=True, actual=ready,
+                                 onpass="ONOS summary command succeded",
+                                 onfail="ONOS summary command failed" )
 
-        utilities.assert_equals( expect = main.TRUE, actual = caseResult,
-                                 onpass = "ONOS startup successful",
-                                 onfail = "ONOS startup NOT successful" )
-
-        if caseResult == main.FALSE:
+        if not ready:
             main.log.error( "ONOS startup failed!" )
             main.cleanup()
             main.exit()
 
-
     def CASE200( self, main ):
         main.case( "Activate sdn-ip application" )
         main.log.info( "waiting link discovery......" )
-        time.sleep( int ( main.params['timers']['TopoDiscovery'] ) )
+        time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
 
         main.log.info( "Get links in the network" )
         summaryResult = main.ONOScli1.summary()
         linkNum = json.loads( summaryResult )[ "links" ]
-        listResult = main.ONOScli1.links( jsonFormat = False )
+        listResult = main.ONOScli1.links( jsonFormat=False )
         main.log.info( listResult )
-
         if linkNum < 100:
             main.log.error( "Link number is wrong!" )
+            time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
+            listResult = main.ONOScli1.links( jsonFormat=False )
+            main.log.info( listResult )
             main.cleanup()
             main.exit()
 
         main.step( "Activate sdn-ip application" )
         activeSDNIPresult = main.ONOScli1.activateApp( "org.onosproject.sdnip" )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = activeSDNIPresult,
-                                 onpass = "Activate SDN-IP succeeded",
-                                 onfail = "Activate SDN-IP failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=activeSDNIPresult,
+                                 onpass="Activate SDN-IP succeeded",
+                                 onfail="Activate SDN-IP failed" )
         if not activeSDNIPresult:
+            main.log.info( "Activate SDN-IP failed!" )
             main.cleanup()
             main.exit()
 
@@ -217,18 +235,6 @@
         main.log.info( "Wait Quagga to finish delivery all routes to each \
         other and to sdn-ip, plus finish installing all intents..." )
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-        # TODO
-        # time.sleep( int( main.params[ 'timers' ][ 'PathAvailable' ] ) )
-
-        '''
-        # TODO: use for together with wrapperFile1
-        wrapperFile2 = main.params[ 'DEPENDENCY' ][ 'wrapper2' ]
-        main.USECASE_SdnipI2MN_Cluster = imp.load_source( wrapperFile2,
-                                                         main.dependencyPath +
-                                                         wrapperFile2 +
-                                                         ".py" )
-        '''
-
 
     def CASE1( self, main ):
         '''
@@ -236,42 +242,47 @@
         '''
 
         main.case( "Ping tests between BGP peers and speakers" )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
-
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
 
     def CASE2( self, main ):
         '''
         point-to-point intents test for each BGP peer and BGP speaker pair
         '''
+        import time
         main.case( "Check point-to-point intents" )
         main.log.info( "There are %s BGP peers in total "
                        % main.params[ 'config' ][ 'peerNum' ] )
         main.step( "Check P2P intents number from ONOS CLI" )
 
-        getIntentsResult = main.ONOScli1.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
         bgpIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         bgpIntentsExpectedNum = int( main.params[ 'config' ][ 'peerNum' ] ) * 6 * 2
+        if bgpIntentsActualNum != bgpIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            bgpIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         main.log.info( "bgpIntentsExpected num is:" )
         main.log.info( bgpIntentsExpectedNum )
         main.log.info( "bgpIntentsActual num is:" )
         main.log.info( bgpIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
-            onpass = "PointToPointIntent Intent Num is correct!",
-            onfail = "PointToPointIntent Intent Num is wrong!" )
+            expect=True,
+            actual=eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
+            onpass="PointToPointIntent Intent Num is correct!",
+            onfail="PointToPointIntent Intent Num is wrong!" )
 
 
     def CASE3( self, main ):
         '''
         routes and intents check to all BGP peers
         '''
+        import time
         main.case( "Check routes and M2S intents to all BGP peers" )
 
         allRoutesExpected = []
@@ -279,11 +290,16 @@
         allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" )
         allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" )
 
-        getRoutesResult = main.ONOScli1.routes( jsonFormat = True )
+        getRoutesResult = main.ONOScli1.routes( jsonFormat=True )
         allRoutesActual = \
             main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
         allRoutesStrExpected = str( sorted( allRoutesExpected ) )
         allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
+        if allRoutesStrActual != allRoutesStrExpected:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            allRoutesActual = \
+                main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
+            allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
 
         main.step( "Check routes installed" )
         main.log.info( "Routes expected:" )
@@ -291,32 +307,40 @@
         main.log.info( "Routes get from ONOS CLI:" )
         main.log.info( allRoutesStrActual )
         utilities.assertEquals( \
-            expect = allRoutesStrExpected, actual = allRoutesStrActual,
-            onpass = "Routes are correct!",
-            onfail = "Routes are wrong!" )
+            expect=allRoutesStrExpected, actual=allRoutesStrActual,
+            onpass="Routes are correct!",
+            onfail="Routes are wrong!" )
 
         main.step( "Check M2S intents installed" )
-        getIntentsResult = main.ONOScli1.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
         routeIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
         routeIntentsExpectedNum = 3
+        if routeIntentsActualNum != routeIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            routeIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
 
         main.log.info( "MultiPointToSinglePoint Intent Num expected is:" )
         main.log.info( routeIntentsExpectedNum )
         main.log.info( "MultiPointToSinglePoint Intent NUM Actual is:" )
         main.log.info( routeIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( routeIntentsExpectedNum, routeIntentsActualNum ),
-            onpass = "MultiPointToSinglePoint Intent Num is correct!",
-            onfail = "MultiPointToSinglePoint Intent Num is wrong!" )
+            expect=routeIntentsExpectedNum,
+            actual=routeIntentsActualNum,
+            onpass="MultiPointToSinglePoint Intent Num is correct!",
+            onfail="MultiPointToSinglePoint Intent Num is wrong!" )
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE4( self, main ):
@@ -325,8 +349,8 @@
         '''
         main.case( "Ping test for each route, all hosts behind BGP peers" )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE5( self, main ):
@@ -336,16 +360,16 @@
         import time
         main.case( "Bring down links and check routes/intents" )
         main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "pr64514",
-                                         OPTION = "down" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="pr64514",
+                                         OPTION="down" )
         # When bring down a link, Mininet will bring down both the interfaces
         # at the two sides of the link. Here we do not want to bring down the
         # host side interface, since I noticed when bring up in CASE6, some of
         # the configuration information will lost.
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
 
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -357,12 +381,12 @@
             main.exit()
 
         main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "pr64515",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="pr64515",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
@@ -373,12 +397,12 @@
             main.exit()
 
         main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "pr64516",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="pr64516",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 0 )
@@ -389,19 +413,23 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=False )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = False )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=False )
 
 
     def CASE6( self, main ):
@@ -411,12 +439,12 @@
         import time
         main.case( "Bring up links and check routes/intents" )
         main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "pr64514",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="pr64514",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
@@ -427,12 +455,12 @@
             main.exit()
 
         main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "pr64515",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="pr64515",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 2 )
@@ -443,12 +471,12 @@
             main.exit()
 
         main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "pr64516",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="pr64516",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
@@ -459,19 +487,23 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE7( self, main ):
@@ -481,10 +513,10 @@
         import time
         main.case( "Stop edge sw32,check P-2-P and M-2-S intents, ping test" )
         main.step( "Stop sw32" )
-        result = main.Mininet.switch( SW = "sw32", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw32", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
 
         if result == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -497,30 +529,30 @@
             main.exit()
 
         main.step( "Check ping between hosts behind BGP peers" )
-        result1 = main.Mininet.pingHost( src = "host64514", target = "host64515" )
-        result2 = main.Mininet.pingHost( src = "host64515", target = "host64516" )
-        result3 = main.Mininet.pingHost( src = "host64514", target = "host64516" )
+        result1 = main.Mininet.pingHost( src="host64514", target="host64515" )
+        result2 = main.Mininet.pingHost( src="host64515", target="host64516" )
+        result3 = main.Mininet.pingHost( src="host64514", target="host64516" )
 
         pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \
                       and ( result3 == main.FALSE )
-        utilities.assert_equals( expect = True, actual = pingResult1,
-                                 onpass = "Ping test result is correct",
-                                 onfail = "Ping test result is wrong" )
+        utilities.assert_equals( expect=True, actual=pingResult1,
+                                 onpass="Ping test result is correct",
+                                 onfail="Ping test result is wrong" )
 
         if pingResult1 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between BGP peers and speaker1" )
-        result4 = main.Mininet.pingHost( src = "speaker1", target = "pr64514" )
-        result5 = main.Mininet.pingHost( src = "speaker1", target = "pr64515" )
-        result6 = main.Mininet.pingHost( src = "speaker1", target = "pr64516" )
+        result4 = main.Mininet.pingHost( src="speaker1", target="pr64514" )
+        result5 = main.Mininet.pingHost( src="speaker1", target="pr64515" )
+        result6 = main.Mininet.pingHost( src="speaker1", target="pr64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                       and ( result6 == main.TRUE )
-        utilities.assert_equals( expect = True, actual = pingResult2,
-                                 onpass = "Speaker1 ping peers successful",
-                                 onfail = "Speaker1 ping peers NOT successful" )
+        utilities.assert_equals( expect=True, actual=pingResult2,
+                                 onpass="Speaker1 ping peers successful",
+                                 onfail="Speaker1 ping peers NOT successful" )
 
         if pingResult2 == False:
             main.cleanup()
@@ -528,26 +560,30 @@
 
         main.step( "Check ping between BGP peers and speaker2" )
         # TODO
-        result7 = main.Mininet.pingHost( src = "speaker2", target = pr64514 )
-        result8 = main.Mininet.pingHost( src = "speaker2", target = pr64515 )
-        result9 = main.Mininet.pingHost( src = "speaker2", target = pr64516 )
+        result7 = main.Mininet.pingHost( src="speaker2", target=pr64514 )
+        result8 = main.Mininet.pingHost( src="speaker2", target=pr64515 )
+        result9 = main.Mininet.pingHost( src="speaker2", target=pr64516 )
 
         pingResult3 = ( result7 == main.FALSE ) and ( result8 == main.TRUE ) \
                                                 and ( result9 == main.TRUE )
-        utilities.assert_equals( expect = True, actual = pingResult2,
-                                 onpass = "Speaker2 ping peers successful",
-                                 onfail = "Speaker2 ping peers NOT successful" )
+        utilities.assert_equals( expect=True, actual=pingResult2,
+                                 onpass="Speaker2 ping peers successful",
+                                 onfail="Speaker2 ping peers NOT successful" )
 
         if pingResult3 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE8( self, main ):
@@ -558,20 +594,20 @@
         import time
         main.case( "Start the edge sw32, check P-2-P and M-2-S intents, ping test" )
         main.step( "Start sw32" )
-        result1 = main.Mininet.switch( SW = "sw32", OPTION = "start" )
+        result1 = main.Mininet.switch( SW="sw32", OPTION="start" )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result1,
-            onpass = "Starting switch succeeded!",
-            onfail = "Starting switch failed!" )
+            expect=main.TRUE,
+            actual=result1,
+            onpass="Starting switch succeeded!",
+            onfail="Starting switch failed!" )
 
         result2 = main.Mininet.assignSwController( "sw32", fsfwIp,
-                                                   port = fsfwPort )
+                                                   port=fsfwPort )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result2,
-            onpass = "Connect switch to FSFW succeeded!",
-            onfail = "Connect switch to FSFW failed!" )
+            expect=main.TRUE,
+            actual=result2,
+            onpass="Connect switch to FSFW succeeded!",
+            onfail="Connect switch to FSFW failed!" )
 
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -584,22 +620,26 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE9( self, main ):
@@ -619,10 +659,10 @@
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Stop sw11" )
-        result = main.Mininet.switch( SW = "sw11", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw11", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
         if result:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -635,21 +675,25 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE10( self, main ):
@@ -667,15 +711,15 @@
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Start sw11" )
-        result1 = main.Mininet.switch( SW = "sw11", OPTION = "start" )
-        utilities.assertEquals( expect = main.TRUE, actual = result1,
-                                onpass = "Starting switch succeeded!",
-                                onfail = "Starting switch failed!" )
+        result1 = main.Mininet.switch( SW="sw11", OPTION="start" )
+        utilities.assertEquals( expect=main.TRUE, actual=result1,
+                                onpass="Starting switch succeeded!",
+                                onfail="Starting switch failed!" )
         result2 = main.Mininet.assignSwController( "sw11", fsfwIp,
-                                                   port = fsfwPort )
-        utilities.assertEquals( expect = main.TRUE, actual = result2,
-                                onpass = "Connect switch to FSFW succeeded!",
-                                onfail = "Connect switch to FSFW failed!" )
+                                                   port=fsfwPort )
+        utilities.assertEquals( expect=main.TRUE, actual=result2,
+                                onpass="Connect switch to FSFW succeeded!",
+                                onfail="Connect switch to FSFW failed!" )
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
@@ -691,21 +735,25 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE11(self, main):
@@ -717,21 +765,25 @@
         main.Functions.checkM2SintentNum( main, 3 )
         main.Functions.checkP2PintentNum( main, 18 * 2 )
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
         main.step( "Kill speaker1" )
         command1 = "ps -e | grep bgp -c"
@@ -749,10 +801,10 @@
 
         result3 = main.Mininet.node( "root", command1 )
 
-        utilities.assert_equals( expect = True,
-                                 actual = ( "4" in result3 ),
-                                 onpass = "Kill speaker1 succeeded",
-                                 onfail = "Kill speaker1 failed" )
+        utilities.assert_equals( expect=True,
+                                 actual=( "4" in result3 ),
+                                 onpass="Kill speaker1 succeeded",
+                                 onfail="Kill speaker1 failed" )
         if ( "4" not in result3 ) :
             main.log.info( result3 )
             main.cleanup()
@@ -764,23 +816,27 @@
         main.Functions.checkP2PintentNum( main, 18 * 2 )
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=False )
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE12( self, main ):
@@ -806,44 +862,52 @@
         else:
             uninstallResult = main.ONOSbench.onosStop( ONOS3Ip )
 
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = uninstallResult,
-                                 onpass = "Uninstall ONOS leader succeeded",
-                                 onfail = "Uninstall ONOS leader failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=uninstallResult,
+                                 onpass="Uninstall ONOS leader succeeded",
+                                 onfail="Uninstall ONOS leader failed" )
         if uninstallResult != main.TRUE:
             main.cleanup()
             main.exit()
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
 
         if leaderIP == ONOS1Ip:
-            main.Functions.checkRouteNum( main, 3, ONOScli = "ONOScli2" )
-            main.Functions.checkM2SintentNum( main, 3, ONOScli = "ONOScli2" )
-            main.Functions.checkP2PintentNum( main, 18 * 2, ONOScli = "ONOScli2" )
+            main.Functions.checkRouteNum( main, 3, ONOScli="ONOScli2" )
+            main.Functions.checkM2SintentNum( main, 3, ONOScli="ONOScli2" )
+            main.Functions.checkP2PintentNum( main, 18 * 2, ONOScli="ONOScli2" )
 
             main.step( "Check whether all flow status are ADDED" )
+            flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                         main.FALSE,
+                                         kwargs={'isPENDING':False},
+                                         attempts=10 )
             utilities.assertEquals( \
-                expect = main.TRUE,
-                actual = main.ONOScli2.checkFlowsState( isPENDING_ADD = False ),
-                onpass = "Flow status is correct!",
-                onfail = "Flow status is wrong!" )
+                expect=main.TRUE,
+                actual=flowCheck,
+                onpass="Flow status is correct!",
+                onfail="Flow status is wrong!" )
         else:
             main.Functions.checkRouteNum( main, 3 )
             main.Functions.checkM2SintentNum( main, 3 )
             main.Functions.checkP2PintentNum( main, 18 * 2 )
 
             main.step( "Check whether all flow status are ADDED" )
+            flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                         main.FALSE,
+                                         kwargs={'isPENDING':False},
+                                         attempts=10 )
             utilities.assertEquals( \
-                expect = main.TRUE,
-                actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-                onpass = "Flow status is correct!",
-                onfail = "Flow status is wrong!" )
+                expect=main.TRUE,
+                actual=flowCheck,
+                onpass="Flow status is correct!",
+                onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
