From dc926403d768344d9b8c9730b6daea6b48b2d8cb Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Thu, 17 Oct 2024 20:41:56 -0700 Subject: [PATCH] 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 --- test/syscalls/linux/tcp_socket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/syscalls/linux/tcp_socket.cc b/test/syscalls/linux/tcp_socket.cc index aa65e7c30..6a198ae3d 100644 --- a/test/syscalls/linux/tcp_socket.cc +++ b/test/syscalls/linux/tcp_socket.cc @@ -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);