diff options
author | feldsherov <feldsherov@yandex-team.ru> | 2022-02-10 16:49:29 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:29 +0300 |
commit | 077ab504815199e62ffc54daee873cf1d6b64297 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/http/server/http_ut.cpp | |
parent | e73723ec73b27276cd45b9b46b752138a51d669c (diff) | |
download | ydb-077ab504815199e62ffc54daee873cf1d6b64297.tar.gz |
Restoring authorship annotation for <feldsherov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/server/http_ut.cpp')
-rw-r--r-- | library/cpp/http/server/http_ut.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/library/cpp/http/server/http_ut.cpp b/library/cpp/http/server/http_ut.cpp index 16f72df972..cc62bb988e 100644 --- a/library/cpp/http/server/http_ut.cpp +++ b/library/cpp/http/server/http_ut.cpp @@ -481,29 +481,29 @@ Y_UNIT_TEST_SUITE(THttpServerTest) { ExceptionMessage = CurrentExceptionMessage(); } - TString ExceptionMessage; - }; - - class TResetConnectionServer: public THttpServer::ICallBack { - class TRequest: public TClientRequest { - public: - bool Reply(void* /*tsr*/) override { - Output() << "HTTP/1.1"; - ResetConnection(); - - return true; - } - }; - + TString ExceptionMessage; + }; + + class TResetConnectionServer: public THttpServer::ICallBack { + class TRequest: public TClientRequest { + public: + bool Reply(void* /*tsr*/) override { + Output() << "HTTP/1.1"; + ResetConnection(); + + return true; + } + }; + public: - TClientRequest* CreateClient() override { - return new TRequest(); - } - - void OnException() override { - ExceptionMessage = CurrentExceptionMessage(); - } - + TClientRequest* CreateClient() override { + return new TRequest(); + } + + void OnException() override { + ExceptionMessage = CurrentExceptionMessage(); + } + TString ExceptionMessage; }; @@ -526,21 +526,21 @@ Y_UNIT_TEST_SUITE(THttpServerTest) { } }; - Y_UNIT_TEST(TTestResetConnection) { - TPortManager pm; - const ui16 port = pm.GetPort(); - - TResetConnectionServer serverImpl; - THttpServer server(&serverImpl, THttpServer::TOptions(port)); - UNIT_ASSERT(server.Start()); - - TTestRequest r(port, "request"); - - UNIT_ASSERT_EXCEPTION_CONTAINS(r.Execute(), TSystemError, "Connection reset by peer"); - - server.Stop(); - }; - + Y_UNIT_TEST(TTestResetConnection) { + TPortManager pm; + const ui16 port = pm.GetPort(); + + TResetConnectionServer serverImpl; + THttpServer server(&serverImpl, THttpServer::TOptions(port)); + UNIT_ASSERT(server.Start()); + + TTestRequest r(port, "request"); + + UNIT_ASSERT_EXCEPTION_CONTAINS(r.Execute(), TSystemError, "Connection reset by peer"); + + server.Stop(); + }; + Y_UNIT_TEST(TTestReleaseConnection) { TPortManager pm; const ui16 port = pm.GetPort(); |