Committed by
Gerrit Code Review
Make test a little more resilient in the face of flows being slow to be installed
Change-Id: Ic1a2fda1226e6a6c452bd37e6d010e2066239204
Showing
2 changed files
with
11 additions
and
5 deletions
... | @@ -9,7 +9,13 @@ trap "rm -f $aux 2>/dev/null" EXIT | ... | @@ -9,7 +9,13 @@ trap "rm -f $aux 2>/dev/null" EXIT |
9 | onos ${1:-$OCI} "onos:flows" > $aux | 9 | onos ${1:-$OCI} "onos:flows" > $aux |
10 | cat $aux | 10 | cat $aux |
11 | 11 | ||
12 | -let status=0 | ||
13 | -grep "PENDING_" $aux && let status=status+1 | ||
14 | - | ||
15 | -exit $status | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
12 | +for i in {1..5}; do | ||
13 | + let status=0 | ||
14 | + grep "PENDING_" $aux && let status=status+1 | ||
15 | + if [ "$status" == "0" ] | ||
16 | + then | ||
17 | + exit 0 | ||
18 | + fi | ||
19 | + sleep 5 | ||
20 | +done | ||
21 | +exit 1 | ... | ... |
... | @@ -40,7 +40,7 @@ | ... | @@ -40,7 +40,7 @@ |
40 | <step name="Balance-Masters" requires="~Check-Summary" if="${OC2}" | 40 | <step name="Balance-Masters" requires="~Check-Summary" if="${OC2}" |
41 | exec="onos ${OC1} balance-masters"/> | 41 | exec="onos ${OC1} balance-masters"/> |
42 | 42 | ||
43 | - <step name="Check-Flows" requires="~Balance-Masters,~Check-Summary" delay="10" | 43 | + <step name="Check-Flows" requires="~Balance-Masters,~Check-Summary" delay="5" |
44 | exec="onos-check-flows ${OC1}"/> | 44 | exec="onos-check-flows ${OC1}"/> |
45 | </group> | 45 | </group> |
46 | </scenario> | 46 | </scenario> | ... | ... |
-
Please register or login to post a comment