Skip to content

Commit

Permalink
lib-http: test-http-client-errors: Make "peer reuse failure" test rel…
Browse files Browse the repository at this point in the history
…iable.

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.
  • Loading branch information
stephanbosch authored and cmouse committed Aug 16, 2018
1 parent 2e6a374 commit d98aaff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-http/test-http-client-errors.c
Expand Up @@ -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);
Expand Down

0 comments on commit d98aaff

Please sign in to comment.