Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 25 for 500 (0.13 sec)

  1. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

          throw RuntimeException("boom!")
        }
    
        queue.schedule("task", TimeUnit.MILLISECONDS.toNanos(200)) {
          log.put("normal task running")
          return@schedule -1L
        }
    
        queue.idleLatch().await(500, TimeUnit.MILLISECONDS)
    
        assertThat(log.take()).isEqualTo("failing task running")
        assertThat(log.take()).isEqualTo("uncaught exception: java.lang.RuntimeException: boom!")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  2. 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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/DuplexTest.kt

      }
    
      @Test
      fun fullCallTimeoutAppliesToSetup() {
        enableProtocol(Protocol.HTTP_2)
        server.enqueue(
          MockResponse.Builder()
            .headersDelay(500, TimeUnit.MILLISECONDS)
            .build(),
        )
        val request =
          Request.Builder()
            .url(server.url("/"))
            .post(AsyncRequestBody())
            .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

          assertThat(ioe.cause!!).isInstanceOf<EOFException>()
        }
      }
    
      // TODO GET preferred order - with tests to confirm this
      // 1. successful fresh cached GET response
      // 2. unsuccessful (404, 500) fresh cached GET response
      // 3. successful network response
      // 4. successful stale cached GET response
      // 5. unsuccessful response
      @Test
      fun usesCache() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/InterceptorTest.kt

        assertThat(response).isSameInstanceAs(interceptorResponse)
      }
    
      @Test
      fun networkInterceptorsCannotShortCircuitResponses() {
        server.enqueue(
          MockResponse.Builder()
            .code(500)
            .build(),
        )
        val interceptor =
          Interceptor { chain: Interceptor.Chain ->
            Response.Builder()
              .request(chain.request())
              .protocol(Protocol.HTTP_1_1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CallTest.kt

          assertThat(expected.message).isEqualTo("Invalid URL port: \"65536\"")
        }
      }
    
      @Test
      fun getReturns500() {
        server.enqueue(MockResponse(code = 500))
        executeSynchronously("/")
          .assertCode(500)
          .assertNotSuccessful()
      }
    
      @Test
      fun get_HTTP_2() {
        enableProtocol(Protocol.HTTP_2)
        get()
      }
    
      @Test
      fun get_HTTPS() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt

    fun formatDuration(ns: Long): String {
      val s =
        when {
          ns <= -999_500_000 -> "${(ns - 500_000_000) / 1_000_000_000} s "
          ns <= -999_500 -> "${(ns - 500_000) / 1_000_000} ms"
          ns <= 0 -> "${(ns - 500) / 1_000} µs"
          ns < 999_500 -> "${(ns + 500) / 1_000} µs"
          ns < 999_500_000 -> "${(ns + 500_000) / 1_000_000} ms"
          else -> "${(ns + 500_000_000) / 1_000_000_000} s "
        }
      return String.format("%6s", s)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

              Buffer()
                .write(ByteArray(responseBodySize)),
            )
            .throttleBody(64 * 1024, 125, MILLISECONDS) // 500 Kbps
            .build(),
        )
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        cancelLater(call, 500)
        val responseBody = response.body.byteStream()
        val buffer = ByteArray(1024)
        assertFailsWith<IOException> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

     *     .build();
     * ```
     *
     * This example shows a call with a short 500 millisecond read timeout and a 1000 millisecond
     * write timeout. Original configuration is kept, but can be overriden.
     *
     * ```java
     * OkHttpClient eagerClient = client.newBuilder()
     *     .readTimeout(500, TimeUnit.MILLISECONDS)
     *     .build();
     * Response response = eagerClient.newCall(request).execute();
     * ```
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CacheTest.kt

        assertCached(false, 413)
        assertCached(true, 414)
        assertCached(false, 415)
        assertCached(false, 416)
        assertCached(false, 417)
        assertCached(false, 418)
        assertCached(false, 500)
        assertCached(true, 501)
        assertCached(false, 502)
        assertCached(false, 503)
        assertCached(false, 504)
        assertCached(false, 505)
        assertCached(false, 506)
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top