From 4db3b442f5f5432fd159dd719eea1fa04c5c452c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 29 Nov 2024 08:16:34 -0500 Subject: tests: fix data race getting results --- src/sp/protocol/reqrep0/rep_test.c | 1 + src/sp/protocol/reqrep0/req_test.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src/sp/protocol/reqrep0') diff --git a/src/sp/protocol/reqrep0/rep_test.c b/src/sp/protocol/reqrep0/rep_test.c index 6ca8fbca..579f795c 100644 --- a/src/sp/protocol/reqrep0/rep_test.c +++ b/src/sp/protocol/reqrep0/rep_test.c @@ -164,6 +164,7 @@ test_rep_double_recv(void) nng_aio_wait(aio2); NUTS_FAIL(nng_aio_result(aio2), NNG_ESTATE); NUTS_CLOSE(s1); + nng_aio_wait(aio1); NUTS_FAIL(nng_aio_result(aio1), NNG_ECLOSED); nng_aio_free(aio1); nng_aio_free(aio2); diff --git a/src/sp/protocol/reqrep0/req_test.c b/src/sp/protocol/reqrep0/req_test.c index 71e08877..d1c615d1 100644 --- a/src/sp/protocol/reqrep0/req_test.c +++ b/src/sp/protocol/reqrep0/req_test.c @@ -934,6 +934,7 @@ test_req_ctx_recv_close_socket(void) nng_ctx_recv(ctx, aio); nng_close(req); + nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ECLOSED); nng_aio_free(aio); NUTS_CLOSE(rep); -- cgit v1.2.3-70-g09d2