Reduce timeout in TcpSocketTest.Closed{Read/Write}BlockingSocket.

The timeout was set to 10 seconds, which is too long. Should be sufficient to
timeout in 3 seconds to ensure read()/send() is blocked.

These tests have multiple variants too. Together, they take too long to run.

PiperOrigin-RevId: 687411356
This commit is contained in:
Ayush Ranjan
2024-10-18 13:47:57 -07:00
committed by gVisor bot
parent 1a02bb22bd
commit d46a5b7c3b
+2 -2
View File
@@ -525,7 +525,7 @@ TEST_P(TcpSocketTest, PollWithFullBufferBlocks) {
TEST_P(TcpSocketTest, ClosedWriteBlockingSocket) {
FillSocketBuffers(connected_.get(), accepted_.get());
constexpr int timeout = 10;
constexpr int timeout = 3;
struct timeval tv = {.tv_sec = timeout, .tv_usec = 0};
EXPECT_THAT(
setsockopt(connected_.get(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)),
@@ -558,7 +558,7 @@ TEST_P(TcpSocketTest, ClosedWriteBlockingSocket) {
}
TEST_P(TcpSocketTest, ClosedReadBlockingSocket) {
constexpr int timeout = 10;
constexpr int timeout = 3;
struct timeval tv = {.tv_sec = timeout, .tv_usec = 0};
EXPECT_THAT(
setsockopt(connected_.get(), SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)),