Merge "Remove outdated tests from automated test schedule"
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
index 7501bf5..d4d1971 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
@@ -27,6 +27,7 @@
 
     <TEST>
         <warmUp>5</warmUp>
+        <maxLatency>1000</maxLatency>
         <sampleSize>20</sampleSize>
         <intents>1,100,1000</intents>                       #list format, will be split on ','
         <FObjintents>1,100</FObjintents>
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
index 7a8a294..40790fb 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
@@ -282,8 +282,10 @@
 
                     firstLocalLatnecy, lastLocalLatnecy, firstGlobalLatency, lastGlobalLatnecy \
                         = main.intentRerouteLatFuncs.calculateLatency( main, topologyTimestamps, intentTimestamps )
-                    if firstLocalLatnecy < 0:
-                        main.log.info( "Got negative latency, skipping this iteration..." )
+                    maxLatency = float( main.params[ 'TEST' ][ 'maxLatency' ] )
+                    if firstLocalLatnecy < 0 or lastLocalLatnecy < 0 or \
+                       firstLocalLatnecy > maxLatency or lastLocalLatnecy > maxLatency:
+                        main.log.info( "Got invalid latency, skipping this iteration..." )
                         main.intentRerouteLatFuncs.bringBackTopology( main )
                         if main.validRun >= main.warmUp:
                             main.invalidRun += 1