From: Stephan Bosch Date: Thu, 13 Sep 2018 07:16:41 +0000 (+0200) Subject: lib-http: test-http-client-errors: Address another reliability issue in "peer reuse... X-Git-Tag: 2.3.9~1401 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b28d47dbfcb681e03a8a61bf4ed6a66a9385eb9;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-client-errors: Address another reliability issue in "peer reuse failure" test. --- 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');