From a587ecddc69771a511868eda09488da60e2745ad Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sun, 11 Jan 2026 11:54:15 +0000 Subject: [PATCH] Avoid ServerTruncatesRequestTest windows failure (#9249) ``` // "java.net.SocketException: Socket closed" thrown reading response after // "java.net.SocketException: Connection reset by peer" writing request assumeNotWindows() ``` --- .../jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt b/okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt index edde7cbfd..41a0256ca 100644 --- a/okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt +++ b/okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt @@ -48,6 +48,7 @@ import okhttp3.CallEvent.ResponseHeadersStart import okhttp3.CallEvent.SecureConnectEnd import okhttp3.CallEvent.SecureConnectStart import okhttp3.Headers.Companion.headersOf +import okhttp3.TestUtil.assumeNotWindows import okhttp3.internal.duplex.AsyncRequestBody import okhttp3.testing.PlatformRule import okio.BufferedSink @@ -91,6 +92,10 @@ class ServerTruncatesRequestTest { @Test fun serverTruncatesRequestOnLongPostHttp1() { + // "java.net.SocketException: Socket closed" thrown reading response after + // "java.net.SocketException: Connection reset by peer" writing request + assumeNotWindows() + serverTruncatesRequestOnLongPost(https = false) } @@ -196,6 +201,10 @@ class ServerTruncatesRequestTest { @Test fun serverTruncatesRequestButTrailersCanStillBeReadHttp1() { + // "java.net.SocketException: Socket closed" thrown reading response after + // "java.net.SocketException: Connection reset by peer" writing request + assumeNotWindows() + serverTruncatesRequestButTrailersCanStillBeRead(http2 = false) }