diff --git a/mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt b/mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt index 0b1b5d700ba7..f8803f4f1186 100644 --- a/mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt +++ b/mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt @@ -14,6 +14,7 @@ * limitations under the License. */ @file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") + package mockwebserver3.internal.http2 import java.io.File diff --git a/okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt b/okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt index c969df2501bf..c26d8cf0268b 100644 --- a/okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt +++ b/okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt @@ -166,7 +166,7 @@ class TaskFaker : Closeable { override fun decorate(queue: BlockingQueue) = TaskFakerBlockingQueue(queue) }, - logger = taskLogger + logger = taskLogger, ) /** Wait for the test thread to proceed. */ diff --git a/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt b/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt index ddb816bdae62..9355599cf279 100644 --- a/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt +++ b/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt @@ -104,7 +104,7 @@ internal interface TaskLogger { fun logString( queue: TaskQueue, message: String, - task: Task + task: Task, ) = "${queue.name} ${"%-22s".format(message)}: ${task.name}" /** diff --git a/okhttp/src/test/java/okhttp3/CacheTest.kt b/okhttp/src/test/java/okhttp3/CacheTest.kt index e6921ddf495e..0a64e41a928b 100644 --- a/okhttp/src/test/java/okhttp3/CacheTest.kt +++ b/okhttp/src/test/java/okhttp3/CacheTest.kt @@ -2699,6 +2699,8 @@ class CacheTest { */ @Test fun testGoldenCacheResponse() { + platform.assumeNotWindows() + cache.close() server.enqueue( MockResponse.Builder() @@ -2755,6 +2757,8 @@ CLEAN $urlKey ${entryMetadata.length} ${entryBody.length} /** Exercise the cache format in OkHttp 2.7 and all earlier releases. */ @Test fun testGoldenCacheHttpsResponseOkHttp27() { + platform.assumeNotWindows() + val url = server.url("/") val urlKey = key(url) val prefix = get().getPrefix() @@ -2803,6 +2807,8 @@ CLEAN $urlKey ${entryMetadata.length} ${entryBody.length} /** The TLS version is present in OkHttp 3.0 and beyond. */ @Test fun testGoldenCacheHttpsResponseOkHttp30() { + platform.assumeNotWindows() + val url = server.url("/") val urlKey = key(url) val prefix = get().getPrefix() @@ -2855,6 +2861,8 @@ CLEAN $urlKey ${entryMetadata.length} ${entryBody.length} @Test fun testGoldenCacheHttpResponseOkHttp30() { + platform.assumeNotWindows() + val url = server.url("/") val urlKey = key(url) val prefix = get().getPrefix() diff --git a/okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt b/okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt index 1f8a28fe67d0..8e616e5b3f9e 100644 --- a/okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt +++ b/okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt @@ -69,6 +69,9 @@ class ServerTruncatesRequestTest { @Test fun serverTruncatesRequestOnLongPostHttp1() { + // java.net.SocketException: An established connection was aborted by the software in your host machine + platform.assumeNotWindows() + serverTruncatesRequestOnLongPost(https = false) } @@ -171,6 +174,9 @@ class ServerTruncatesRequestTest { @Test fun serverTruncatesRequestButTrailersCanStillBeReadHttp1() { + // java.net.SocketException: An established connection was aborted by the software in your host machine + platform.assumeNotWindows() + serverTruncatesRequestButTrailersCanStillBeRead(http2 = false) }