Test: stabilized test_restconf_internal* tests by looping
This commit is contained in:
parent
2d8567cd1b
commit
520f20def5
2 changed files with 64 additions and 48 deletions
|
|
@ -96,7 +96,8 @@ function rpcstatus()
|
|||
active=$1
|
||||
status=$2
|
||||
|
||||
sleep $DEMSLEEP
|
||||
jmax=10
|
||||
for j in $(seq 1 $jmax); do
|
||||
new "send rpc status"
|
||||
rpc=$(chunked_framing "<rpc $DEFAULTNS><process-control $LIBNS><name>restconf</name><operation>status</operation></process-control></rpc>")
|
||||
retx=$($clixon_netconf -qef $cfg<<EOF
|
||||
|
|
@ -123,6 +124,13 @@ EOF
|
|||
|
||||
match=$(echo "$retx" | grep --null -Go "$expect")
|
||||
if [ -z "$match" ]; then
|
||||
echo "retry after sleep"
|
||||
sleep $DEMSLEEP
|
||||
continue
|
||||
fi
|
||||
break
|
||||
done
|
||||
if [ $j -eq $jmax ]; then
|
||||
err "$expect" "$retx"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,8 @@ function rpcstatus()
|
|||
active=$1
|
||||
status=$2
|
||||
|
||||
sleep $DEMSLEEP
|
||||
jmax=10
|
||||
for j in $(seq 1 $jmax); do
|
||||
new "send rpc status"
|
||||
rpc=$(chunked_framing "<rpc $DEFAULTNS><process-control $LIBNS><name>restconf</name><operation>status</operation></process-control></rpc>")
|
||||
retx=$($clixon_netconf -qef $cfg<<EOF
|
||||
|
|
@ -139,6 +140,13 @@ EOF
|
|||
fi
|
||||
match=$(echo "$retx" | grep --null -Go "$expect")
|
||||
if [ -z "$match" ]; then
|
||||
echo "retry after sleep"
|
||||
sleep $DEMSLEEP
|
||||
continue
|
||||
fi
|
||||
break
|
||||
done
|
||||
if [ $j -eq $jmax ]; then
|
||||
err "$expect" "$retx"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue