Commit 8eab14e8 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

corrected timeout test case

parent 85a33d2e
......@@ -30,7 +30,6 @@ struct run_my_rpc_args
static void run_my_rpc(void *_arg);
static hg_id_t my_rpc_hang_id;
static hg_id_t my_rpc_shutdown_id;
int main(int argc, char **argv)
{
......@@ -90,8 +89,6 @@ int main(int argc, char **argv)
/* register RPCs */
my_rpc_hang_id = MARGO_REGISTER(mid, "my_rpc_hang", my_rpc_hang_in_t, my_rpc_hang_out_t,
NULL);
my_rpc_shutdown_id = MARGO_REGISTER(mid, "my_shutdown_rpc", void, void,
NULL);
/* find addr for server */
hret = margo_addr_lookup(mid, argv[1], &svr_addr);
......@@ -136,15 +133,9 @@ int main(int argc, char **argv)
}
/* send one rpc to server to shut it down */
/* create handle */
hret = margo_create(mid, svr_addr, my_rpc_shutdown_id, &handle);
hret = margo_shutdown_remote_instance(mid, svr_addr);
assert(hret == HG_SUCCESS);
hret = margo_forward_timed(handle, NULL, 2000.0);
assert(hret == HG_SUCCESS);
margo_destroy(handle);
margo_addr_free(mid, svr_addr);
/* shut down everything */
......
......@@ -15,7 +15,7 @@ source $srcdir/tests/test-util.sh
TMPOUT=$($MKTEMP --tmpdir test-XXXXXX)
# start 1 server with 2 second wait, 8s timeout
test_start_servers 1 2 8
test_start_servers 1 2 10
sleep 1
......@@ -29,9 +29,9 @@ if [ $? -ne 0 ]; then
exit 1
fi
# check output; look for four "returned 2" to indicate HG_TIMEOUT in the four
# check output; look for four "returned 18" to indicate HG_TIMEOUT in the four
# concurrent RPCs
LINECOUNT=$(grep "returned 2" $TMPOUT | wc -l)
LINECOUNT=$(grep "returned 18" $TMPOUT | wc -l)
if [ $LINECOUNT -ne 4 ]; then
rm -rf $TMPOUT
exit 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment