Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 13 of 13 for bodyDelay (0.06 sec)

  1. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

      }
    
      /** Delay the response body by sleeping 1s.  */
      @Test
      fun delayResponse() {
        assumeNotWindows()
        server.enqueue(
          MockResponse.Builder()
            .body("ABCDEF")
            .bodyDelay(1, TimeUnit.SECONDS)
            .build(),
        )
        val startNanos = System.nanoTime()
        val connection = server.url("/").toUrl().openConnection()
        val inputStream = connection!!.getInputStream()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

      @Test
      @Throws(InterruptedException::class)
      fun reconnectingToNonWebSocket() {
        for (i in 0..29) {
          webServer.enqueue(
            MockResponse.Builder()
              .bodyDelay(100, TimeUnit.MILLISECONDS)
              .body("Wrong endpoint")
              .code(401)
              .build(),
          )
        }
        val request =
          Request.Builder()
            .url(webServer.url("/"))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
Back to top