Fix a problem which set cfg didn't work correct

Change-Id: I944ffc824f07908edfd194b31a806319ac99ceb8
diff --git a/TestON/tests/SCPFintentEventTpWithFlowObj/SCPFintentEventTpWithFlowObj.py b/TestON/tests/SCPFintentEventTpWithFlowObj/SCPFintentEventTpWithFlowObj.py
index 41b46da..092af87 100644
--- a/TestON/tests/SCPFintentEventTpWithFlowObj/SCPFintentEventTpWithFlowObj.py
+++ b/TestON/tests/SCPFintentEventTpWithFlowObj/SCPFintentEventTpWithFlowObj.py
@@ -306,7 +306,7 @@
             main.ONOSbench.handle.sendline(cmd)
             main.ONOSbench.handle.expect(":~")
             main.log.info("Stopping intentperf" )
-            
+
             with open("/tmp/IntentEventTPflowObjDB", "a") as resultsDB:
                 for node in groupResult:
                     resultString = "'" + commit + "',"
@@ -318,8 +318,18 @@
                     resultString += str(0) + "\n" #no stddev
                     resultsDB.write(resultString)
             resultsDB.close()
-            resultsDB.close()
             main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])
+
     def CASE3( self, main ):
-        main.log.info("Set Intent Compiler use Flow Object")
-        stepResult = main.ONOSbench.onosCfgSet( ONOSIp[0],"org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator", "useFlowObjectives true")
\ No newline at end of file
+        main.step("Set Intent Compiler use Flow Object")
+        stepResult = utilities.retry( main.ONOSbench.onosCfgSet,
+                                      main.FALSE,
+                                      args=[ "10.128.174.1",
+                                        "org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator",
+                                        "useFlowObjectives true" ],
+                                      sleep=3,
+                                      attempts=3 )
+        utilities.assert_equals( expect = main.TRUE,
+                                  actual = stepResult,
+                                  onpass = "Successfully set Intent compiler use Flow object",
+                                  onfail = "Failed to set up" )
diff --git a/TestON/tests/SCPFintentRerouteLatWithFlowObj/SCPFintentRerouteLatWithFlowObj.py b/TestON/tests/SCPFintentRerouteLatWithFlowObj/SCPFintentRerouteLatWithFlowObj.py
index a7ecb43..439ecef 100644
--- a/TestON/tests/SCPFintentRerouteLatWithFlowObj/SCPFintentRerouteLatWithFlowObj.py
+++ b/TestON/tests/SCPFintentRerouteLatWithFlowObj/SCPFintentRerouteLatWithFlowObj.py
@@ -134,7 +134,7 @@
             main.ONOSbench.onosCfgSet( ONOSIp[1], "org.onosproject.provider.nil.NullProviders", "deviceCount 8")
             main.ONOSbench.onosCfgSet( ONOSIp[1], "org.onosproject.provider.nil.NullProviders", "topoShape reroute")
             main.ONOSbench.onosCfgSet( ONOSIp[1], "org.onosproject.provider.nil.NullProviders", "enabled true")
-            main.ONOS1cli.setCfg( "org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator", "useFlowObjectives", "true")
+            main.ONOSbench.onosCfgSet( ONOSIp[1], "org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator", "useFlowObjectives true" )
             time.sleep(5)
             main.ONOSbench.handle.sendline("onos $OC1 summary")
             main.ONOSbench.handle.expect(":~")