- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for takeSink (0.06 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt
override fun writeTo(sink: BufferedSink) { requestBodySinks.add(sink) } override fun isDuplex(): Boolean = true @Throws(InterruptedException::class) fun takeSink(): BufferedSink { return requestBodySinks.poll(5, SECONDS) ?: throw AssertionError("no sink to take") } fun assertNoMoreSinks() { assertTrue(requestBodySinks.isEmpty()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
body = requestBody, ), ) call.execute().use { response -> assertThat(response.body.string()).isEqualTo("abc") val requestBodyOut = requestBody.takeSink() assertFailsWith<IOException> { SlowRequestBody.writeTo(requestBodyOut) } assertFailsWith<IOException> { requestBodyOut.close() } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0)