Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for clearAllEvents (0.22 sec)

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

            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        val response1 = call1.execute()
        assertThat(response1.code).isEqualTo(200)
        response1.body.close()
        listener.clearAllEvents()
        val call2 =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        val response2 = call2.execute()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 56.9K bytes
    - Viewed (2)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

              .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) {
        if (e.connection != null) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

        cancelLatch.await()
    
        val events = listener.eventSequence.filter { isConnectionEvent(it) }.map { it.name }
        listener.clearAllEvents()
    
        assertThat(events).startsWith("CallStart", "ConnectStart", "ConnectEnd", "ConnectionAcquired")
        if (cancelMode == CANCEL) {
          assertThat(events).contains("Canceled")
        } else {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

              .toDouble(),
          )
            .isCloseTo(elapsedMs.toDouble(), 100.0)
        }
    
        return result
      }
    
      fun recordedEventTypes() = eventSequence.map { it.name }
    
      fun clearAllEvents() {
        while (eventSequence.isNotEmpty()) {
          takeEvent()
        }
      }
    
      private fun logEvent(e: CallEvent) {
        for (lock in forbiddenLocks) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9K bytes
    - Viewed (0)
  5. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

            "ResponseHeadersEnd", "ResponseBodyStart", "ResponseBodyEnd", "ConnectionReleased",
            "CallEnd",
          ),
          eventListener.recordedEventTypes(),
        )
    
        eventListener.clearAllEvents()
    
        client.newCall(request).execute().use { response ->
          assertEquals(200, response.code)
        }
    
        assertEquals(
          listOf(
            "CallStart",
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 27K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CallTest.kt

        val request1 = Request.Builder().url(server.url("/")).build()
        val response1 = client.newCall(request1).execute()
        assertThat(response1.body.string()).isEqualTo("abc")
    
        listener.clearAllEvents()
    
        val request2 =
          Request(
            url = server.url("/"),
            body = "body!".toRequestBody("text/plain".toMediaType()),
          )
        assertFailsWith<IOException> {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top