Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for bodyDelay (0.04 sec)

  1. okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt

            }
          }
        }
      }
    
      @Test
      fun timeoutCall() {
        runTest {
          server.enqueue(
            MockResponse
              .Builder()
              .bodyDelay(5, TimeUnit.SECONDS)
              .body("abc")
              .build(),
          )
    
          val call = client.newCall(request)
    
          assertFailsWith<TimeoutCancellationException> {
            withTimeout(1.seconds) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

        SocketPolicy.RESET_STREAM_AT_START -> result.onRequestStart(CloseStream(http2ErrorCode))
      }
    
      result.throttleBody(throttleBytesPerPeriod, getThrottlePeriod(MILLISECONDS), MILLISECONDS)
      result.bodyDelay(getBodyDelay(MILLISECONDS), MILLISECONDS)
      result.headersDelay(getHeadersDelay(MILLISECONDS), MILLISECONDS)
      return result.build()
    }
    
    private fun PushPromise.wrap(): mockwebserver3.PushPromise =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  3. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        throttleBytesPerPeriod = mockResponse.throttleBytesPerPeriod
        var throttlePeriod: Long = mockResponse.getThrottlePeriod(TimeUnit.SECONDS)
        mockResponse = mockResponse.setBodyDelay(0L, TimeUnit.SECONDS)
        val bodyDelay: Long = mockResponse.getBodyDelay(TimeUnit.SECONDS)
        mockResponse = mockResponse.setHeadersDelay(0L, TimeUnit.SECONDS)
        val headersDelay: Long = mockResponse.getHeadersDelay(TimeUnit.SECONDS)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

        client =
          client
            .newBuilder()
            .callTimeout(250, TimeUnit.MILLISECONDS)
            .build()
        server.enqueue(
          MockResponse
            .Builder()
            .bodyDelay(500, TimeUnit.MILLISECONDS)
            .setHeader("content-type", "text/event-stream")
            .body("data: hey\n\n")
            .build(),
        )
        val source = newEventSource()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 8.1K bytes
    - Viewed (0)
Back to top