Use infinite timeout on Fuchsia

PiperOrigin-RevId: 602783304
This commit is contained in:
Bruno Dal Bo
2024-01-30 11:11:52 -08:00
committed by gVisor bot
parent aa8e121e8d
commit 80af63b5e3
+3 -1
View File
@@ -769,7 +769,9 @@ void TestHangupDuringConnect(const SocketInetTestParam& param,
.fd = client.get(),
};
constexpr int kTimeout = 2000;
int n = poll(&pfd, 1, kTimeout);
// NB: poll indefinitely on Fuchsia to avoid timing out in Infra.
int n =
poll(&pfd, 1, GvisorPlatform() == Platform::kFuchsia ? -1 : kTimeout);
ASSERT_GE(n, 0) << strerror(errno);
ASSERT_EQ(n, 1);
ASSERT_EQ(pfd.revents, POLLHUP | POLLERR);