Skip to content

Commit

Permalink
[test] let rpc server shutdown naturally
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfitz committed Feb 23, 2015
1 parent 9592638 commit 3f35981
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions tests/integration/check-rpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ header "Check rpc replies get through on immediate shutdown"
for (( k=0; k<25; k++ )); do
port_name=/rpc/$$/$k
${YARP_BIN}/yarp rpcserver --stop --echo $port_name &
add_helper $!
${YARP_BIN}/yarp wait $port_name
echo hello | ${YARP_BIN}/yarp rpc $port_name
cleanup_helper
wait_port_gone $port_name
done

8 changes: 8 additions & 0 deletions tests/integration/test-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ function wait_topic_gone {
done
}

function wait_port_gone {
port="$1"
while ${YARP_BIN}/yarp exists $port ; do
echo "waiting for $port to disappear"
sleep 1
done
}

function wait_node {
node="$1"
key="$2"
Expand Down

0 comments on commit 3f35981

Please sign in to comment.