aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server/http_ut.cpp
diff options
context:
space:
mode:
authorcherenkov-p-a <cherenkov-p-a@yandex-team.ru>2022-02-10 16:49:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:39 +0300
commit8124e2bb214b063687e0d77c900150c727e16782 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/http/server/http_ut.cpp
parent9011d1fa16370ec024d20180d440f7ae6fd0e1c8 (diff)
downloadydb-8124e2bb214b063687e0d77c900150c727e16782.tar.gz
Restoring authorship annotation for <cherenkov-p-a@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.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/http/server/http_ut.cpp b/library/cpp/http/server/http_ut.cpp
index 3216aab0ad..cc62bb988e 100644
--- a/library/cpp/http/server/http_ut.cpp
+++ b/library/cpp/http/server/http_ut.cpp
@@ -559,7 +559,7 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
UNIT_ASSERT_STRINGS_EQUAL(serverImpl.ExceptionMessage, "(yexception) some error");
};
- THttpInput SendRequest(TSocket& socket, ui16 port) {
+ THttpInput SendRequest(TSocket& socket, ui16 port) {
TSocketInput si(socket);
TSocketOutput so(socket);
THttpOutput out(&so);
@@ -571,7 +571,7 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
THttpInput input(&si);
input.ReadAll();
- return input;
+ return input;
}
THttpInput SendRequestWithBody(TSocket& socket, ui16 port, TString body) {
@@ -642,24 +642,24 @@ Y_UNIT_TEST_SUITE(THttpServerTest) {
}
- Y_UNIT_TEST(TTestCloseConnectionOnRequestLimit) {
- TPortManager pm;
- const ui16 port = pm.GetPort();
-
- TEchoServer serverImpl("test_data");
- THttpServer server(&serverImpl, THttpServer::TOptions(port).EnableKeepAlive(true).SetMaxRequestsPerConnection(2));
- UNIT_ASSERT(server.Start());
-
- TSocket socket(TNetworkAddress("localhost", port), TDuration::Seconds(10));
-
- UNIT_ASSERT(SendRequest(socket, port).IsKeepAlive());
- UNIT_ASSERT(!SendRequest(socket, port).IsKeepAlive());
-
- UNIT_ASSERT_EXCEPTION(SendRequest(socket, port), THttpReadException);
-
- server.Stop();
- }
-
+ Y_UNIT_TEST(TTestCloseConnectionOnRequestLimit) {
+ TPortManager pm;
+ const ui16 port = pm.GetPort();
+
+ TEchoServer serverImpl("test_data");
+ THttpServer server(&serverImpl, THttpServer::TOptions(port).EnableKeepAlive(true).SetMaxRequestsPerConnection(2));
+ UNIT_ASSERT(server.Start());
+
+ TSocket socket(TNetworkAddress("localhost", port), TDuration::Seconds(10));
+
+ UNIT_ASSERT(SendRequest(socket, port).IsKeepAlive());
+ UNIT_ASSERT(!SendRequest(socket, port).IsKeepAlive());
+
+ UNIT_ASSERT_EXCEPTION(SendRequest(socket, port), THttpReadException);
+
+ server.Stop();
+ }
+
Y_UNIT_TEST(TTestListenerSockAddrConnection) {
TPortManager pm;
const ui16 port1 = pm.GetPort();