Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for RecordingCallback (0.36 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/RecordingCallback.kt

     */
    package okhttp3
    
    import java.io.IOException
    import java.util.concurrent.TimeUnit
    
    /**
     * Records received HTTP responses so they can be later retrieved by tests.
     */
    class RecordingCallback : Callback {
      private val responses = mutableListOf<RecordedResponse>()
    
      @Synchronized
      override fun onFailure(
        call: Call,
        e: IOException,
      ) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt

      @RegisterExtension
      val clientTestRule = OkHttpClientTestRule()
    
      @StartStop
      private val server = MockWebServer()
    
      private var client = clientTestRule.newClient()
      private val callback = RecordingCallback()
    
      @Test
      fun applicationInterceptorsCanShortCircuitResponses() {
        server.close() // Accept no connections.
        val request =
          Request
            .Builder()
            .url("https://localhost:1/")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 28.2K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/DispatcherTest.kt

    @Tag("Slowish")
    class DispatcherTest {
      @RegisterExtension
      val clientTestRule = OkHttpClientTestRule()
      private val executor = RecordingExecutor(this)
      val callback = RecordingCallback()
      val webSocketListener =
        object : WebSocketListener() {
        }
      val dispatcher = Dispatcher(executor)
      val listener = RecordingEventListener()
      var client =
        clientTestRule
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

      private var client =
        clientTestRule
          .newClientBuilder()
          .eventListenerFactory(clientTestRule.wrap(listener))
          .build()
      private val callback = RecordingCallback()
      private val cache =
        Cache(
          fileSystem = LoggingFilesystem(fileSystem),
          directory = "/cache".toPath(),
          maxSize = Int.MAX_VALUE.toLong(),
        )
    
      @BeforeEach
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
Back to top