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