- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for removeUpToEvent (0.08 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
.build(), ) val response = call.execute() assertThat(response.code).isEqualTo(200) response.body.close() listener.removeUpToEvent<DnsStart>() listener.removeUpToEvent<DnsEnd>() listener.removeUpToEvent<DnsStart>() listener.removeUpToEvent<DnsEnd>() } @Test fun failedDnsLookup() { client = client .newBuilder() .dns(FakeDns())
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 60.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionListenerTest.kt
assertThat(response.code).isEqualTo(200) response.body.close() listener.removeUpToEvent(ConnectionEvent.ConnectEnd::class.java) listener.removeUpToEvent(ConnectionEvent.ConnectionReleased::class.java) listener.removeUpToEvent(ConnectionEvent.ConnectionAcquired::class.java) listener.removeUpToEvent(ConnectionEvent.ConnectionReleased::class.java) } @Test @Throws(IOException::class)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 9.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
} } } catch (e: NoSuchElementException) { throw AssertionError("full event sequence: $fullEventSequence", e) } } inline fun <reified T : CallEvent> removeUpToEvent(): T = removeUpToEvent(T::class.java) inline fun <reified T : CallEvent> findEvent(): T = eventSequence.first { it is T } as T /** * Remove and return the next event from the recorded sequence. *
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 9.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt
forbiddenLocks.add(lock) } /** * Removes recorded events up to (and including) an event is found whose class equals [eventClass] * and returns it. */ fun <T : ConnectionEvent> removeUpToEvent(eventClass: Class<T>): T { val fullEventSequence = eventSequence.toList() try { while (true) { val event = takeEvent() if (eventClass.isInstance(event)) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 5.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
// The call that seeds the connection pool. listener.removeUpToEvent(CallEnd::class.java) // The ResponseFailed event is not necessarily fatal! listener.removeUpToEvent(ConnectionAcquired::class.java) listener.removeUpToEvent(ResponseFailed::class.java) listener.removeUpToEvent(ConnectionReleased::class.java) listener.removeUpToEvent(ConnectionAcquired::class.java)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 146.6K bytes - Viewed (0)