- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for assertExhausted (0.1 sec)
-
okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt
} }, ) server.close(1001, "bye") clientListener.assertClosed(1001, "bye") clientListener.assertExhausted() serverListener.assertClosing(1000, "") serverListener.assertClosed(1000, "") serverListener.assertExhausted() } @Test fun unplannedCloseHandledWithoutFailure() { webServer.enqueue( MockResponse.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Mar 31 17:16:15 UTC 2024 - 35.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt
@BeforeEach fun setUp() { client.initWebSocket(random) server.initWebSocket(random) } @AfterEach @Throws(Exception::class) fun tearDown() { client.listener.assertExhausted() server.listener.assertExhausted() server.source.close() client.source.close() taskFaker.runTasks() server.webSocket!!.tearDown() client.webSocket!!.tearDown() taskFaker.close() } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 01:59:58 UTC 2024 - 18.5K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourcesHttpTest.kt
private val client = clientTestRule.newClient() @BeforeEach fun before(server: MockWebServer) { this.server = server } @AfterEach fun after() { listener.assertExhausted() } @Test fun processResponse() { server.enqueue( MockResponse.Builder() .body( """ |data: hey | | """.trimMargin(),
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 2.6K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt
eventSource.cancel() } } private fun nextEvent(): Any { return events.poll(10, TimeUnit.SECONDS) ?: throw AssertionError("Timed out waiting for event.") } fun assertExhausted() { assertThat(events).isEmpty() } fun assertEvent( id: String?, type: String?, data: String, ) { assertThat(nextEvent()).isEqualTo(Event(id, type, data)) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 6.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt
} fun assertClosed( code: Int, reason: String, ) { assertThat(nextEvent()).isEqualTo(Closed(code, reason)) } fun assertExhausted() { assertThat(events).isEmpty() } fun assertOpen(): WebSocket { val event = nextEvent() as Open return event.webSocket } fun assertFailure(t: Throwable?) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketReaderTest.kt
isClient = true, source = data, frameCallback = callback.asFrameCallback(), perMessageDeflate = true, noContextTakeover = false, ) @AfterEach fun tearDown() { callback.assertExhausted() } @Test fun controlFramesMustBeFinal() { data.write("0a00".decodeHex()) // Empty pong. assertFailsWith<ProtocolException> { clientReader.processNextFrame() }.also { expected ->
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 14.4K bytes - Viewed (0)