mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user