aboutsummaryrefslogtreecommitdiffstats
path: root/util/network/socket_ut.cpp
diff options
context:
space:
mode:
authorleo <leo@yandex-team.ru>2022-02-10 16:46:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:40 +0300
commit99609724f661f7e21d1cb08e8d80e87c3632fdb3 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/network/socket_ut.cpp
parent980edcd3304699edf9d4e4d6a656e585028e2a72 (diff)
downloadydb-99609724f661f7e21d1cb08e8d80e87c3632fdb3.tar.gz
Restoring authorship annotation for <leo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/network/socket_ut.cpp')
-rw-r--r--util/network/socket_ut.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/util/network/socket_ut.cpp b/util/network/socket_ut.cpp
index ff7a9e6279..6b20e11f70 100644
--- a/util/network/socket_ut.cpp
+++ b/util/network/socket_ut.cpp
@@ -312,29 +312,29 @@ void TPollTest::TestPollInOut() {
}
}
- int expectedCount = 0;
+ int expectedCount = 0;
for (size_t i = 0; i < connectedSockets.size(); ++i) {
pollfd fd = {(i % 5 == 4) ? INVALID_SOCKET : static_cast<SOCKET>(*connectedSockets[i]), POLLIN | POLLOUT, 0};
fds.push_back(fd);
- if (i % 5 != 4)
- ++expectedCount;
+ if (i % 5 != 4)
+ ++expectedCount;
}
int polledCount = poll(&fds[0], fds.size(), INFTIM);
- UNIT_ASSERT_EQUAL(expectedCount, polledCount);
+ UNIT_ASSERT_EQUAL(expectedCount, polledCount);
for (size_t i = 0; i < connectedSockets.size(); ++i) {
- short revents = fds[i].revents;
+ short revents = fds[i].revents;
if (i % 5 == 0) {
- UNIT_ASSERT_EQUAL(static_cast<short>(POLLRDNORM | POLLWRNORM), revents);
+ UNIT_ASSERT_EQUAL(static_cast<short>(POLLRDNORM | POLLWRNORM), revents);
} else if (i % 5 == 1) {
- UNIT_ASSERT_EQUAL(static_cast<short>(POLLOUT | POLLWRNORM), revents);
+ UNIT_ASSERT_EQUAL(static_cast<short>(POLLOUT | POLLWRNORM), revents);
} else if (i % 5 == 2) {
- UNIT_ASSERT_EQUAL(static_cast<short>(POLLHUP | POLLRDNORM | POLLWRNORM), revents);
+ UNIT_ASSERT_EQUAL(static_cast<short>(POLLHUP | POLLRDNORM | POLLWRNORM), revents);
} else if (i % 5 == 3) {
- UNIT_ASSERT_EQUAL(static_cast<short>(POLLHUP | POLLWRNORM), revents);
+ UNIT_ASSERT_EQUAL(static_cast<short>(POLLHUP | POLLWRNORM), revents);
} else if (i % 5 == 4) {
- UNIT_ASSERT_EQUAL(static_cast<short>(POLLNVAL), revents);
+ UNIT_ASSERT_EQUAL(static_cast<short>(POLLNVAL), revents);
}
}
#endif