Skip to content

Commit

Permalink
DAOS-15667 cart: Set individual rpc timeouts (#14181)
Browse files Browse the repository at this point in the history
- Set individual rpc timeouts for swim test client to 10 seconds,
so that the global timeout would not be affecting them.

Signed-off-by: Alexander A Oganezov <alexander.a.oganezov@intel.com>
  • Loading branch information
frostedcmos authored Apr 22, 2024
1 parent ff908d0 commit cb13dab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/tests/ftest/cart/test_group_np_cli.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright 2016-2022 Intel Corporation.
* (C) Copyright 2016-2024 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -39,6 +39,10 @@ send_rpc_swim_check(crt_endpoint_t server_ep, crt_rpc_t *rpc_req)
rpc_req_input->rank = test_g.t_verify_swim_status.rank;
rpc_req_input->exp_status = test_g.t_verify_swim_status.swim_status;

/* RPC is expected to finish in 10 seconds */
rc = crt_req_set_timeout(rpc_req, 10);
D_ASSERTF(rc == 0, "crt_req_set_timeout() failed. rc: %d\n", rc);

rc = crt_req_send(rpc_req, client_cb_common, NULL);
D_ASSERTF(rc == 0, "crt_req_send() failed. rc: %d\n", rc);

Expand All @@ -63,6 +67,10 @@ send_rpc_disable_swim(crt_endpoint_t server_ep, crt_rpc_t *rpc_req)
/* Set rank and expected swim status based on CLI options */
rpc_req_input->rank = server_ep.ep_rank;

/* RPC is expected to finish in 10 seconds */
rc = crt_req_set_timeout(rpc_req, 10);
D_ASSERTF(rc == 0, "crt_req_set_timeout() failed. rc: %d\n", rc);

rc = crt_req_send(rpc_req, client_cb_common, NULL);
D_ASSERTF(rc == 0, "crt_req_send() failed. rc: %d\n", rc);

Expand Down Expand Up @@ -128,7 +136,7 @@ test_run(void)
rank_list,
test_g.t_srv_ctx_num - 1,
test_g.t_srv_ctx_num,
50,
10, /* Individual ping timeout */
test_g.t_wait_ranks_time);
D_ASSERTF(rc == 0, "wait_for_ranks() failed; rc=%d\n", rc);
}
Expand Down

0 comments on commit cb13dab

Please sign in to comment.