diff --git a/test/syscalls/linux/tcp_socket.cc b/test/syscalls/linux/tcp_socket.cc index 8d6b7ff60..ab332609d 100644 --- a/test/syscalls/linux/tcp_socket.cc +++ b/test/syscalls/linux/tcp_socket.cc @@ -1257,7 +1257,8 @@ PosixErrorOr nonBlockingConnectNoListener( // Wait for the connect to fail. struct pollfd poll_fd = {s.get(), POLLERR, 0}; - EXPECT_THAT(RetryEINTR(poll)(&poll_fd, 1, 1000), SyscallSucceedsWithValue(1)); + EXPECT_THAT(RetryEINTR(poll)(&poll_fd, 1, kTimeoutMillis), + SyscallSucceedsWithValue(1)); return std::move(s); } @@ -1732,7 +1733,8 @@ TEST_P(SimpleTcpSocketTest, NonBlockingConnectRefused) { // We don't need to specify any events to get POLLHUP or POLLERR as these // are added before the poll. struct pollfd poll_fd = {s.get(), /*events=*/0, 0}; - EXPECT_THAT(RetryEINTR(poll)(&poll_fd, 1, 1000), SyscallSucceedsWithValue(1)); + EXPECT_THAT(RetryEINTR(poll)(&poll_fd, 1, kTimeoutMillis), + SyscallSucceedsWithValue(1)); // The ECONNREFUSED should cause us to be woken up with POLLHUP. EXPECT_NE(poll_fd.revents & (POLLHUP | POLLERR), 0);