From: Stephan Bosch Date: Mon, 13 Aug 2018 17:23:31 +0000 (+0200) Subject: lib-http: test-http-client-errors: Make "peer reuse failure" test reliable. X-Git-Tag: 2.3.9~1557 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d98aaff4243563d3939a047816ec11d0d93298bf;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-client-errors: Make "peer reuse failure" test reliable. It was highly timing-sensitive, since it required a particular error status to be returned. Sometimes, it would yield a different error based on a slightly different order of events, making the test fail. Such failures aren't relevant though, since this regression test is about triggering a segfault that used to occur. --- diff --git a/src/lib-http/test-http-client-errors.c b/src/lib-http/test-http-client-errors.c index f74d051809..5c311687a5 100644 --- a/src/lib-http/test-http-client-errors.c +++ b/src/lib-http/test-http-client-errors.c @@ -2668,7 +2668,7 @@ test_client_peer_reuse_failure_response2( if (debug) i_debug("RESPONSE: %u %s", resp->status, resp->reason); - test_assert(resp->status == HTTP_CLIENT_REQUEST_ERROR_CONNECT_FAILED); + test_assert((resp->status / 100) > 2); test_assert(resp->reason != NULL && *resp->reason != '\0'); i_free(ctx); io_loop_stop(ioloop);