STC - check that flows are installed before checking pings

Change-Id: Ia2853932db8e27bd1447d225b160c8e583d7df61
diff --git a/tools/test/bin/onos-check-flows b/tools/test/bin/onos-check-flows
index afff9af..ce80444 100755
--- a/tools/test/bin/onos-check-flows
+++ b/tools/test/bin/onos-check-flows
@@ -6,7 +6,7 @@
 aux=/tmp/stc-$$.log
 trap "rm -f $aux 2>/dev/null" EXIT
 
-for i in {1..5}; do
+for i in {1..6}; do
     onos ${1:-$OCI} "onos:flows" > $aux
     if grep "PENDING_" $aux; then
         sleep 5
diff --git a/tools/test/scenarios/net-create-flows.xml b/tools/test/scenarios/net-create-flows.xml
index 92da7d5..f16501e 100644
--- a/tools/test/scenarios/net-create-flows.xml
+++ b/tools/test/scenarios/net-create-flows.xml
@@ -54,6 +54,10 @@
         <step name="Net-Create-Flows.Host-to-4" requires="^"
               exec="create-flow.py ${OC1} f10 of:0000000000000004 3 1"/>
 
+        <!-- Make sure all flows are added -->
+        <step name="Net-Create-Flows.Check-Flows-Added" requires="^"
+              exec="onos-check-flows ${OC1}"/>
+
         <!-- Check that connectivity was established -->
         <step name="Net-Create-Flows.Ping-XY" requires="^"
               exec="onos-mininet sendAndExpect h1 ping -c1 h4 --expect \ 0% packet loss"/>