Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for recordedEventTypes (0.12 sec)

  1. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

        // In the process we made one successful connection attempt.
        assertThat(listener.recordedEventTypes().filter { it == "ConnectStart" }).hasSize(2)
        assertThat(listener.recordedEventTypes().filter { it == "ConnectFailed" }).hasSize(1)
        assertThat(listener.recordedEventTypes().filter { it == "ConnectEnd" }).hasSize(1)
      }
    
      @Test
      fun reachesIpv6WhenIpv4IsDown() {
        serverIpv4.shutdown()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/EventListenerTest.kt

          )
        val response = call.execute()
        assertThat(response.code).isEqualTo(200)
        assertThat(response.body.string()).isEqualTo("abc")
        response.body.close()
        assertThat(listener.recordedEventTypes()).containsExactly(
          "CallStart",
          "ProxySelectStart", "ProxySelectEnd", "DnsStart", "DnsEnd",
          "ConnectStart", "ConnectEnd", "ConnectionAcquired", "RequestHeadersStart",
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 56.9K bytes
    - Viewed (2)
  3. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

              .build(),
          )
        val response = call.execute()
        assertThat(response.code).isEqualTo(200)
        assertThat(response.body.string()).isEqualTo("abc")
        response.body.close()
        assertThat(listener.recordedEventTypes()).containsExactly(
          "ConnectStart",
          "ConnectEnd",
          "ConnectionAcquired",
          "ConnectionReleased",
        )
      }
    
      @Test
      fun failedCallEventSequence() {
        server!!.enqueue(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/tls/ClientAuthTest.kt

        // SecureConnectEnd, ConnectFailed, CallFailed
        val recordedEventTypes = listener.recordedEventTypes()
        assertThat(recordedEventTypes).startsWith(
          "CallStart",
          "ProxySelectStart",
          "ProxySelectEnd",
          "DnsStart",
          "DnsEnd",
          "ConnectStart",
          "SecureConnectStart",
        )
        assertThat(recordedEventTypes).endsWith("CallFailed")
      }
    
      private fun buildClient(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        val request = newRequest("http://a/1")
        executor.shutdown()
        client.newCall(request).enqueue(callback)
        callback.await(request.url).assertFailure(InterruptedIOException::class.java)
        assertThat(listener.recordedEventTypes())
          .containsExactly("CallStart", "CallFailed")
      }
    
      @Test
      fun executionRejectedAfterMaxRequestsChange() {
        val request1 = newRequest("http://a/1")
        val request2 = newRequest("http://a/2")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/DuplexTest.kt

          val requestBody = (call.request().body as AsyncRequestBody?)!!.takeSink()
          requestBody.writeUtf8("request A\n")
          requestBody.close()
        }
        body.awaitSuccess()
        assertThat(listener.recordedEventTypes()).containsExactly(
          "CallStart", "ProxySelectStart", "ProxySelectEnd", "DnsStart", "DnsEnd", "ConnectStart",
          "SecureConnectStart", "SecureConnectEnd", "ConnectEnd", "ConnectionAcquired",
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

          assertThat(
            TimeUnit.NANOSECONDS.toMillis(actualElapsedNs)
              .toDouble(),
          )
            .isCloseTo(elapsedMs.toDouble(), 100.0)
        }
    
        return result
      }
    
      fun recordedEventTypes() = eventSequence.map { it.name }
    
      fun clearAllEvents() {
        while (eventSequence.isNotEmpty()) {
          takeEvent()
        }
      }
    
      private fun logEvent(e: ConnectionEvent) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  8. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

        assertThat(source.request().url.encodedPath).isEqualTo("/")
        listener.assertOpen()
        listener.assertEvent(null, null, "hey")
        listener.assertClose()
        assertThat(eventListener.recordedEventTypes()).containsExactly(
          "CallStart",
          "ProxySelectStart",
          "ProxySelectEnd",
          "DnsStart",
          "DnsEnd",
          "ConnectStart",
          "ConnectEnd",
          "ConnectionAcquired",
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

        expectedEvents += "ResponseBodyStart"
        expectedEvents += "ResponseBodyEnd"
        expectedEvents += "ConnectionReleased"
        expectedEvents += "CallEnd"
        assertThat(listener.recordedEventTypes()).isEqualTo(expectedEvents)
    
        // Confirm that the connection pool was not corrupted by making another call.
        makeSimpleCall()
      }
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

          for (e in clientEventsList) {
            println(e)
          }
        }
      }
    
      fun recordedConnectionEventTypes(): List<String> {
        return connectionListener.recordedEventTypes()
      }
    
      companion object {
        /**
         * A network that resolves only one IP address per host. Use this when testing route selection
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
Back to top