[SDFAB-988] QER rate limiting tests

Change-Id: I4c542a5c9a122c0595b36e5e96d2b093682cfc7c
diff --git a/TestON/tests/USECASE/SegmentRouting/QOSNonMobile/QOSNonMobile.params b/TestON/tests/USECASE/SegmentRouting/QOSNonMobile/QOSNonMobile.params
index 752e337..dce6647 100644
--- a/TestON/tests/USECASE/SegmentRouting/QOSNonMobile/QOSNonMobile.params
+++ b/TestON/tests/USECASE/SegmentRouting/QOSNonMobile/QOSNonMobile.params
@@ -101,7 +101,7 @@
             </RT_TO_ENB>
             <BE_1_TO_PDN>
                 <name>Best Effort 1</name>
-                <l1_bps>40000000000</l1_bps>
+                <l1_bps>25000000000</l1_bps>
                 <trex_port>2</trex_port>
                 <packet>
                     <pktlen>1400</pktlen>
diff --git a/TestON/tests/USECASE/SegmentRouting/QOSNonMobile/dependencies/QOSNonMobileTest.py b/TestON/tests/USECASE/SegmentRouting/QOSNonMobile/dependencies/QOSNonMobileTest.py
index d53b3f8..456699e 100644
--- a/TestON/tests/USECASE/SegmentRouting/QOSNonMobile/dependencies/QOSNonMobileTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/QOSNonMobile/dependencies/QOSNonMobileTest.py
@@ -7,28 +7,26 @@
 class QOSNonMobileTest:
 
     def runTest(self, main, test_idx, n_switches):
+        run.initTest(main)
+        main.log.info(main.Cluster.numCtrls)
+        main.Cluster.setRunningNode(3)
+        run.installOnos(main, skipPackage=True, cliSleep=5)
+
+        # Use the first available ONOS instance CLI
+        onos_rest = main.Cluster.active(0).REST
+        onos_cli = main.Cluster.active(0).CLI
+
+        trex = Trex()
+        trex.setup(main.TRexClient)
         try:
-            run.initTest(main)
-            main.log.info(main.Cluster.numCtrls)
-            main.Cluster.setRunningNode(3)
-            run.installOnos(main, skipPackage=True, cliSleep=5)
-
-            # Use the first available ONOS instance CLI
-            onos_rest = main.Cluster.active(0).REST
-            onos_cli = main.Cluster.active(0).CLI
-
             # Load traffic config for the current test case
             cfgFile = "%s/tests/CASE_%d.json" % (main.configPath, test_idx)
             with open(cfgFile) as cfg:
                 testCfg = json.load(cfg)
 
-            trex = Trex()
-            trex.setup(main.TRexClient)
-
             original_flows_number = onos_cli.checkFlowCount()
 
             main.step("Verify slices and traffic Classes")
-
             slices_onos = onos_rest.getSlices(debug=True)
 
             # Sanity check for the API, at least the default slice should be there.
@@ -95,10 +93,10 @@
                 minFlowCount=original_flows_number + (new_flows * n_switches)
             )
 
-            main.step("Send traffic with TRex")
             for flow in testCfg["flows"]:
                 trex.createFlow(flow)
             results = trex.sendAndReceiveTraffic(testCfg["duration"])
+            main.step("Verify congestion")
             trex.verifyCongestion(results)
 
             trex.logPortStats()