From 1fa0144b0b54e4e70cbd15e39736d71e512dbd7e Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Thu, 20 Dec 2018 09:24:43 +0200 Subject: [PATCH] Fix broken http test --- maxutils/maxbase/src/test/test_http.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/maxutils/maxbase/src/test/test_http.cc b/maxutils/maxbase/src/test/test_http.cc index c9414e1d0..0e16f9196 100644 --- a/maxutils/maxbase/src/test/test_http.cc +++ b/maxutils/maxbase/src/test/test_http.cc @@ -83,14 +83,20 @@ int check_results(const vector& urls, } else { - if (res.code != 0) + switch (res.code) { + case mxb::http::Result::ERROR: + case mxb::http::Result::COULDNT_RESOLVE_HOST: + case mxb::http::Result::OPERATION_TIMEDOUT: + break; + + default: rv = EXIT_FAILURE; } } } - return rv; + return rv == EXIT_FAILURE ? 1 : 0; } int test_multi_http()