Make test a little more resilient in the face of flows being slow to be installed
Change-Id: Ic1a2fda1226e6a6c452bd37e6d010e2066239204
diff --git a/tools/test/bin/onos-check-flows b/tools/test/bin/onos-check-flows
index 6debebc..1c76511 100755
--- a/tools/test/bin/onos-check-flows
+++ b/tools/test/bin/onos-check-flows
@@ -9,7 +9,13 @@
onos ${1:-$OCI} "onos:flows" > $aux
cat $aux
-let status=0
-grep "PENDING_" $aux && let status=status+1
-
-exit $status
\ No newline at end of file
+for i in {1..5}; do
+ let status=0
+ grep "PENDING_" $aux && let status=status+1
+ if [ "$status" == "0" ]
+ then
+ exit 0
+ fi
+ sleep 5
+done
+exit 1
diff --git a/tools/test/scenarios/net-setup.xml b/tools/test/scenarios/net-setup.xml
index 4e5125a..7ad2ccc 100644
--- a/tools/test/scenarios/net-setup.xml
+++ b/tools/test/scenarios/net-setup.xml
@@ -40,7 +40,7 @@
<step name="Balance-Masters" requires="~Check-Summary" if="${OC2}"
exec="onos ${OC1} balance-masters"/>
- <step name="Check-Flows" requires="~Balance-Masters,~Check-Summary" delay="10"
+ <step name="Check-Flows" requires="~Balance-Masters,~Check-Summary" delay="5"
exec="onos-check-flows ${OC1}"/>
</group>
</scenario>