Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CharArray (0.07 sec)

  1. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        assertThat(recordedRequest.url.encodedQuery)
          .isEqualTo("ct&dns=AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ")
      }
    
      @Test
      fun failOnExcessiveResponse() {
        val array = CharArray(128 * 1024 + 2) { '0' }
        server.enqueue(dnsResponse(String(array)))
        try {
          dns.lookup("google.com")
          fail<Any>()
        } catch (ioe: IOException) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

       */
      @ParameterizedTest
      @ArgumentsSource(ProtocolParamProvider::class)
      fun readTimeoutMoreGranularThanBodySize(protocol: Protocol) {
        setUp(protocol)
        val body = CharArray(4096) // 4KiB to read.
        Arrays.fill(body, 'y')
        server.enqueue(
          MockResponse
            .Builder()
            .body(String(body))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 73.4K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

        // Give the server time to disconnect.
        Thread.sleep(500)
    
        // If the request body is larger than OkHttp's replay buffer, the failure may still occur.
        val requestBodyChars = CharArray(requestSize)
        Arrays.fill(requestBodyChars, 'x')
        val requestBody = String(requestBodyChars)
        for (j in 0..1) {
          try {
            val response =
              getResponse(
                Request(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
Back to top