aboutsummaryrefslogtreecommitdiffstats
path: root/util/network/poller_ut.cpp
diff options
context:
space:
mode:
authorArseny Smalyuk <smalukav@gmail.com>2022-02-10 16:48:05 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:05 +0300
commit5f8a2ce7b1dc3b3e1fae197610f189e7ed1d5723 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /util/network/poller_ut.cpp
parent12559cd7f2fa0cf54ffb0d961949fea58c0e18cb (diff)
downloadydb-5f8a2ce7b1dc3b3e1fae197610f189e7ed1d5723.tar.gz
Restoring authorship annotation for Arseny Smalyuk <smalukav@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/network/poller_ut.cpp')
-rw-r--r--util/network/poller_ut.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/util/network/poller_ut.cpp b/util/network/poller_ut.cpp
index 9324d52c9a..6df0dda8ec 100644
--- a/util/network/poller_ut.cpp
+++ b/util/network/poller_ut.cpp
@@ -3,7 +3,7 @@
#include "pair.h"
#include "poller.h"
-#include "pollerimpl.h"
+#include "pollerimpl.h"
Y_UNIT_TEST_SUITE(TSocketPollerTest) {
Y_UNIT_TEST(TestSimple) {
@@ -209,28 +209,28 @@ Y_UNIT_TEST_SUITE(TSocketPollerTest) {
poller.Unwait(sockets[1]);
}
}
-
-#if defined(HAVE_EPOLL_POLLER)
- Y_UNIT_TEST(TestRdhup) {
- SOCKET sockets[2];
- UNIT_ASSERT(SocketPair(sockets) == 0);
-
- TSocketHolder s1(sockets[0]);
- TSocketHolder s2(sockets[1]);
-
- char buf[1] = {0};
- UNIT_ASSERT_VALUES_EQUAL(1, send(s1, buf, 1, 0));
- shutdown(s1, SHUT_WR);
-
+
+#if defined(HAVE_EPOLL_POLLER)
+ Y_UNIT_TEST(TestRdhup) {
+ SOCKET sockets[2];
+ UNIT_ASSERT(SocketPair(sockets) == 0);
+
+ TSocketHolder s1(sockets[0]);
+ TSocketHolder s2(sockets[1]);
+
+ char buf[1] = {0};
+ UNIT_ASSERT_VALUES_EQUAL(1, send(s1, buf, 1, 0));
+ shutdown(s1, SHUT_WR);
+
using TPoller = TGenericPoller<TEpollPoller<TWithoutLocking>>;
- TPoller poller;
- poller.Set((void*)17, s2, CONT_POLL_RDHUP);
-
- TPoller::TEvent e;
- UNIT_ASSERT_VALUES_EQUAL(poller.WaitD(&e, 1, TDuration::Zero().ToDeadLine()), 1);
- UNIT_ASSERT_EQUAL(TPoller::ExtractStatus(&e), 0);
- UNIT_ASSERT_EQUAL(TPoller::ExtractFilter(&e), CONT_POLL_RDHUP);
- UNIT_ASSERT_EQUAL(TPoller::ExtractEvent(&e), (void*)17);
- }
-#endif
+ TPoller poller;
+ poller.Set((void*)17, s2, CONT_POLL_RDHUP);
+
+ TPoller::TEvent e;
+ UNIT_ASSERT_VALUES_EQUAL(poller.WaitD(&e, 1, TDuration::Zero().ToDeadLine()), 1);
+ UNIT_ASSERT_EQUAL(TPoller::ExtractStatus(&e), 0);
+ UNIT_ASSERT_EQUAL(TPoller::ExtractFilter(&e), CONT_POLL_RDHUP);
+ UNIT_ASSERT_EQUAL(TPoller::ExtractEvent(&e), (void*)17);
+ }
+#endif
}