aboutsummaryrefslogtreecommitdiffstats
path: root/util/network/poller_ut.cpp
diff options
context:
space:
mode:
authorkulikov <kulikov@yandex-team.com>2022-11-14 16:35:19 +0300
committerkulikov <kulikov@yandex-team.com>2022-11-14 16:35:19 +0300
commit7c3d98b1daa4cb8b077d748f4e2d1d5ab042a9c1 (patch)
treeca793d6e7c38e48be4bbf05715ad3738b1595328 /util/network/poller_ut.cpp
parentf3a41eeecd133b98231d8990f887fa7ddffb74d7 (diff)
downloadydb-7c3d98b1daa4cb8b077d748f4e2d1d5ab042a9c1.tar.gz
more information in TEpollPoller::SetImpl error messages
- don't hide epoll_ctl add errors; - print "fd" and "what" args.
Diffstat (limited to 'util/network/poller_ut.cpp')
-rw-r--r--util/network/poller_ut.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/network/poller_ut.cpp b/util/network/poller_ut.cpp
index 6df0dda8ec..e5914b7df3 100644
--- a/util/network/poller_ut.cpp
+++ b/util/network/poller_ut.cpp
@@ -232,5 +232,12 @@ Y_UNIT_TEST_SUITE(TSocketPollerTest) {
UNIT_ASSERT_EQUAL(TPoller::ExtractFilter(&e), CONT_POLL_RDHUP);
UNIT_ASSERT_EQUAL(TPoller::ExtractEvent(&e), (void*)17);
}
+
+ Y_UNIT_TEST(TestSetSocketErrors) {
+ TGenericPoller<TEpollPoller<TWithoutLocking>> poller;
+
+ UNIT_ASSERT_EXCEPTION_CONTAINS(poller.Set(nullptr, Max<int>(), CONT_POLL_READ), TSystemError, "epoll add failed");
+ UNIT_ASSERT_EXCEPTION_CONTAINS(poller.Set(nullptr, Max<int>(), CONT_POLL_READ | CONT_POLL_MODIFY), TSystemError, "epoll modify failed");
+ }
#endif
}