diff options
author | tobo <tobo@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
commit | 55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/messagebus/rain_check | |
parent | 7fe839092527589b38f014d854c51565b3c1adfa (diff) | |
download | ydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/rain_check')
-rw-r--r-- | library/cpp/messagebus/rain_check/http/client_ut.cpp | 24 | ||||
-rw-r--r-- | library/cpp/messagebus/rain_check/http/http_code_extractor.cpp | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/library/cpp/messagebus/rain_check/http/client_ut.cpp b/library/cpp/messagebus/rain_check/http/client_ut.cpp index bb5560debd..1628114391 100644 --- a/library/cpp/messagebus/rain_check/http/client_ut.cpp +++ b/library/cpp/messagebus/rain_check/http/client_ut.cpp @@ -182,24 +182,24 @@ Y_UNIT_TEST_SUITE(RainCheckHttpClient) { UNIT_ASSERT(!!TryGetHttpCodeFromErrorDescription(line)); \ UNIT_ASSERT_EQUAL(*TryGetHttpCodeFromErrorDescription(line), code) - CHECK_VALID_LINE(TStringBuf("library/cpp/neh/http.cpp:<LINE>: request failed(HTTP/1.0 200 Some random message"), 200); - CHECK_VALID_LINE(TStringBuf("library/cpp/neh/http.cpp:<LINE>: request failed(HTTP/1.0 404 Some random message"), 404); - CHECK_VALID_LINE(TStringBuf("request failed(HTTP/1.0 100 Some random message"), 100); - CHECK_VALID_LINE(TStringBuf("request failed(HTTP/1.0 105)"), 105); - CHECK_VALID_LINE(TStringBuf("request failed(HTTP/1.1 2004 Some random message"), 200); + CHECK_VALID_LINE(TStringBuf("library/cpp/neh/http.cpp:<LINE>: request failed(HTTP/1.0 200 Some random message"), 200); + CHECK_VALID_LINE(TStringBuf("library/cpp/neh/http.cpp:<LINE>: request failed(HTTP/1.0 404 Some random message"), 404); + CHECK_VALID_LINE(TStringBuf("request failed(HTTP/1.0 100 Some random message"), 100); + CHECK_VALID_LINE(TStringBuf("request failed(HTTP/1.0 105)"), 105); + CHECK_VALID_LINE(TStringBuf("request failed(HTTP/1.1 2004 Some random message"), 200); #undef CHECK_VALID_LINE #define CHECK_INVALID_LINE(line) \ UNIT_ASSERT_NO_EXCEPTION(TryGetHttpCodeFromErrorDescription(line)); \ UNIT_ASSERT(!TryGetHttpCodeFromErrorDescription(line)) - CHECK_INVALID_LINE(TStringBuf("library/cpp/neh/http.cpp:<LINE>: request failed(HTTP/1.1 1 Some random message")); - CHECK_INVALID_LINE(TStringBuf("request failed(HTTP/1.0 asdf Some random message")); - CHECK_INVALID_LINE(TStringBuf("HTTP/1.0 200 Some random message")); - CHECK_INVALID_LINE(TStringBuf("request failed(HTTP/1.0 2x00 Some random message")); - CHECK_INVALID_LINE(TStringBuf("HTTP/1.0 200 Some random message")); - CHECK_INVALID_LINE(TStringBuf("HTTP/1.0 200")); - CHECK_INVALID_LINE(TStringBuf("request failed(HTTP/1.1 3334 Some random message")); + CHECK_INVALID_LINE(TStringBuf("library/cpp/neh/http.cpp:<LINE>: request failed(HTTP/1.1 1 Some random message")); + CHECK_INVALID_LINE(TStringBuf("request failed(HTTP/1.0 asdf Some random message")); + CHECK_INVALID_LINE(TStringBuf("HTTP/1.0 200 Some random message")); + CHECK_INVALID_LINE(TStringBuf("request failed(HTTP/1.0 2x00 Some random message")); + CHECK_INVALID_LINE(TStringBuf("HTTP/1.0 200 Some random message")); + CHECK_INVALID_LINE(TStringBuf("HTTP/1.0 200")); + CHECK_INVALID_LINE(TStringBuf("request failed(HTTP/1.1 3334 Some random message")); #undef CHECK_INVALID_LINE } } diff --git a/library/cpp/messagebus/rain_check/http/http_code_extractor.cpp b/library/cpp/messagebus/rain_check/http/http_code_extractor.cpp index 44f515d1c3..51d75762f6 100644 --- a/library/cpp/messagebus/rain_check/http/http_code_extractor.cpp +++ b/library/cpp/messagebus/rain_check/http/http_code_extractor.cpp @@ -14,9 +14,9 @@ namespace NRainCheck { // "library/cpp/neh/http.cpp:<LINE>: request failed(<FIRST-HTTP-RESPONSE-LINE>)" // (see library/cpp/neh/http.cpp:625). So, we will try to parse this message and // find out HttpCode in it. It is bad temporary solution, but we have no choice. - const TStringBuf SUBSTR = "request failed("; + const TStringBuf SUBSTR = "request failed("; const size_t SUBSTR_LEN = SUBSTR.size(); - const size_t FIRST_LINE_LEN = TStringBuf("HTTP/1.X NNN").size(); + const size_t FIRST_LINE_LEN = TStringBuf("HTTP/1.X NNN").size(); TMaybe<HttpCodes> httpCode; |