Deflake TcpSocketTest.ClosedWriteBlockingSocket in hostnet mode.

Bump sleep in FillSocketBuffers() so that host netstack gets a chance to move
data from send -> receive buffer.

PiperOrigin-RevId: 687144890
This commit is contained in:
Ayush Ranjan
2024-10-17 20:45:37 -07:00
committed by gVisor bot
parent abe38d82ac
commit dc926403d7
+1 -1
View File
@@ -137,7 +137,7 @@ static void FillSocketBuffers(int sender, int receiver) {
while (RetryEINTR(send)(sender, buf.data(), buf.size(), 0) != -1) {
// Sleep to give linux a chance to move data from the send buffer to the
// receive buffer.
absl::SleepFor(absl::Milliseconds(100)); // 100ms.
absl::SleepFor(absl::Milliseconds(200)); // 200ms.
}
// The last error should have been EWOULDBLOCK.
ASSERT_EQ(errno, EWOULDBLOCK);