From be7ff12178dcba9641c28dcbea0803632c81ad7d Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Thu, 13 Jan 2022 10:50:48 +0000 Subject: [PATCH] * test/*.c: Switch to destroy_and_wait() in various places, no functional change. --- test/acl3744.c | 5 +---- test/largefile.c | 5 ++--- test/oldacl.c | 5 +---- test/redirect.c | 8 ++------ test/xmlreq.c | 6 ++---- 5 files changed, 8 insertions(+), 21 deletions(-) diff --git a/test/acl3744.c b/test/acl3744.c index 5f0bf8b..be2edba 100644 --- a/test/acl3744.c +++ b/test/acl3744.c @@ -36,10 +36,7 @@ static int test_acl(const char *uri, ne_acl_entry *es, int nume) ON(ne_acl3744_set(sess, uri, es, nume)); - CALL(await_server()); - ne_session_destroy(sess); - - return OK; + return destroy_and_wait(sess); } static int grant_all(void) diff --git a/test/largefile.c b/test/largefile.c index e99e960..eb8eb38 100644 --- a/test/largefile.c +++ b/test/largefile.c @@ -181,9 +181,8 @@ static int read_large_response(void) ne_request_destroy(req); CALL(any_2xx_request(sess, "/bar")); - CALL(await_server()); - ne_session_destroy(sess); - return OK; + + return destroy_and_wait(sess); } ne_test tests[] = { diff --git a/test/oldacl.c b/test/oldacl.c index 2e72caa..5c0a671 100644 --- a/test/oldacl.c +++ b/test/oldacl.c @@ -36,10 +36,7 @@ static int test_acl(const char *uri, ne_acl_entry *es, int nume) ON(ne_acl_set(sess, uri, es, nume)); - CALL(await_server()); - ne_session_destroy(sess); - - return OK; + return destroy_and_wait(sess); } static int grant_all(void) diff --git a/test/redirect.c b/test/redirect.c index 682097d..69e39f9 100644 --- a/test/redirect.c +++ b/test/redirect.c @@ -99,11 +99,9 @@ static int check_redir(struct redir_args *args, const char *expect) ONV(strcmp(unp, expect), ("redirected to `%s' not `%s'", unp, expect)); ne_free(unp); - ne_session_destroy(sess); - CALL(await_server()); if (full_expect) ne_free(full_expect); - return OK; + return destroy_and_wait(sess); } #define DEST "http://foo.com/blah/blah/bar" @@ -191,10 +189,8 @@ static int no_redirect(void) ONN("redirect non-NULL after non-redir req", ne_redirect_location(sess)); CALL(process_redir(sess, "/foo", &loc)); - CALL(await_server()); - ne_session_destroy(sess); - return OK; + return destroy_and_wait(sess); } ne_test tests[] = { diff --git a/test/xmlreq.c b/test/xmlreq.c index 1c3344d..ff5d54b 100644 --- a/test/xmlreq.c +++ b/test/xmlreq.c @@ -75,8 +75,7 @@ static int success(void) ne_xml_destroy(parser); ne_request_destroy(req); - ne_session_destroy(sess); - return await_server(); + return destroy_and_wait(sess); } static int failure(void) @@ -105,8 +104,7 @@ static int failure(void) ne_xml_destroy(parser); ne_request_destroy(req); - ne_session_destroy(sess); - return await_server(); + return destroy_and_wait(sess); } static int types(void) -- 2.27.0