Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for connectionAcquired (0.07 sec)

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

          )
        val response = call.execute()
        assertThat(response.code).isEqualTo(200)
        response.body.close()
        val connectionAcquired = listener.removeUpToEvent<ConnectionAcquired>()
        assertThat(connectionAcquired.call).isSameAs(call)
        assertThat(connectionAcquired.connection).isNotNull()
      }
    
      @Test
      fun noConnectionFoundOnFollowUp() {
        server.enqueue(
          MockResponse
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 60.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt

    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionListenerTest.kt

          .execute()
          .close()
    
        assertThat(listener.recordedEventTypes()).containsExactly(
          "ConnectStart",
          "ConnectEnd",
          "ConnectionAcquired",
          "ConnectionReleased",
          "ConnectionAcquired",
          "ConnectionReleased",
        )
      }
    
      @Test
      @Throws(IOException::class)
      fun successfulEmptyH2CallEventSequence() {
        enableTls()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  4. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

          client =
            OkHttpClient
              .Builder()
              .eventListenerFactory(
                clientTestRule.wrap(
                  object : EventListener() {
                    override fun connectionAcquired(
                      call: Call,
                      connection: Connection,
                    ) {
                      socketClass = connection.socket().javaClass.name
                    }
                  },
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 14:12:28 UTC 2025
    - 29K bytes
    - Viewed (0)
  5. okhttp-logging-interceptor/src/test/java/okhttp3/logging/LoggingEventListenerTest.kt

          .assertLogMatch(Regex("""connectStart: ${url.host}/.+ DIRECT"""))
          .assertLogMatch(Regex("""connectEnd: http/1.1"""))
          .assertLogMatch(
            Regex(
              """connectionAcquired: Connection\{${url.host}:\d+, proxy=DIRECT hostAddress=${url.host}/.+ cipherSuite=none protocol=http/1\.1\}""",
            ),
          ).assertLogMatch(Regex("""requestHeadersStart"""))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt

        expectedEvents += "ConnectStart"
        if (https) {
          expectedEvents += "SecureConnectStart"
          expectedEvents += "SecureConnectEnd"
        }
        expectedEvents += "ConnectEnd"
        expectedEvents += "ConnectionAcquired"
        expectedEvents += "RequestHeadersStart"
        expectedEvents += "RequestHeadersEnd"
        expectedEvents += "RequestBodyStart"
        // ... but we can read the response even after writing the request fails.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/HttpUpgradesTest.kt

    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/SessionReuseTest.kt

          client
            .newBuilder()
            .connectionSpecs(listOf(spec))
            .eventListenerFactory(
              clientTestRule.wrap(
                object : EventListener() {
                  override fun connectionAcquired(
                    call: Call,
                    connection: Connection,
                  ) {
                    val sslSocket = connection.socket() as SSLSocket
    
                    sessionIds.add(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 6K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/SocketFailureTest.kt

          .eventListener(listener)
          .build()
    
      class SocketClosingEventListener : EventListener() {
        var shouldClose: Boolean = false
        var lastSocket: Socket? = null
    
        override fun connectionAcquired(
          call: Call,
          connection: Connection,
        ) {
          lastSocket = connection.socket()
        }
    
        override fun requestHeadersStart(call: Call) {
          if (shouldClose) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 21:11:09 UTC 2025
    - 3K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

                latch1.await()
              } catch (e: InterruptedException) {
                throw AssertionError(e)
              }
            }
    
            override fun connectionAcquired(
              call: Call,
              connection: Connection,
            ) {
              // We have the connection and it's in the pool. Let request2 proceed to make a connection.
              latch2.countDown()
            }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jun 19 11:44:16 UTC 2025
    - 19.1K bytes
    - Viewed (0)
Back to top