From 6b28d47dbfcb681e03a8a61bf4ed6a66a9385eb9 Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Thu, 13 Sep 2018 09:16:41 +0200 Subject: [PATCH] lib-http: test-http-client-errors: Address another reliability issue in "peer reuse failure" test. --- src/lib-http/test-http-client-errors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib-http/test-http-client-errors.c b/src/lib-http/test-http-client-errors.c index 319d1a3e1e..960bf13813 100644 --- a/src/lib-http/test-http-client-errors.c +++ b/src/lib-http/test-http-client-errors.c @@ -2681,7 +2681,7 @@ test_client_peer_reuse_failure_response2( if (debug) i_debug("RESPONSE: %u %s", resp->status, resp->reason); - test_assert((resp->status / 100) > 2); + test_assert(http_response_is_internal_error(resp)); test_assert(resp->reason != NULL && *resp->reason != '\0'); i_free(ctx); io_loop_stop(ioloop); @@ -2715,7 +2715,7 @@ test_client_peer_reuse_failure_response1( ctx->first = FALSE; ctx->to = timeout_add_short(500, test_client_peer_reuse_failure_next, ctx); } else { - test_assert(resp->status == HTTP_CLIENT_REQUEST_ERROR_CONNECT_FAILED); + test_assert(http_response_is_internal_error(resp)); } test_assert(resp->reason != NULL && *resp->reason != '\0'); -- 2.47.3