Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 56 for confirm (0.18 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

    import okhttp3.internal.http.RecordingProxySelector
    import okhttp3.tls.HandshakeCertificates
    import okhttp3.tls.internal.TlsUtil.localhost
    
    /**
     * OkHttp is usually tested with functional tests: these use public APIs to confirm behavior against
     * MockWebServer. In cases where logic is particularly tricky, we use unit tests. This class makes
     * it easy to get sample values to use in such tests.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        routeSelector = newRouteSelector(address)
    
        // Confirm we enumerate both proxies, giving preference to the route from ProxyB.
        val selection2 = routeSelector.next()
        dns.assertRequests(PROXY_A_HOST, PROXY_B_HOST)
        assertRoute(selection2.next(), address, proxyB, dns.lookup(PROXY_B_HOST, 0), PROXY_B_PORT)
        assertThat(selection2.hasNext()).isFalse()
    
        // Confirm the last selection contains the postponed route from ProxyA.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

    import java.util.concurrent.ThreadFactory
    import java.util.concurrent.TimeUnit
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    
    /**
     * Integration test to confirm that [TaskRunner] works with a real backend. Business logic is all
     * exercised by [TaskRunnerTest].
     *
     * This test is doing real sleeping with tolerances of 250 ms. Hopefully that's enough for even the
     * busiest of CI servers.
    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)
  4. docs/changelogs/changelog_4x.md

            .build()
        ```
    
     *  New: Add `cacheHit`, `cacheMiss`, and `cacheConditionalHit()` events to `EventListener`. Use
        these in logs, metrics, and even test cases to confirm your cache headers are configured as
        expected.
    
     *  New: Constant string `okhttp3.VERSION`. This is a string like "4.5.0-RC1", "4.5.0", or
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        // Previously we had a bug where we would download the entire response body as long as no
        // individual read took longer than 100ms.
        assertThat(elapsedMillis).isLessThan(500L)
    
        // Do another request to confirm that the discarded connection was not pooled.
        assertContent("A", getResponse(newRequest("/")))
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        // Connection is not pooled.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CallTest.kt

            .method("POST", requestBody2)
            .build()
        val response2 = client.newCall(request2).execute()
        assertThat(response2.code).isEqualTo(200)
    
        // Use sequence numbers to confirm the connection was pooled.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(1)
      }
    
      @Test
    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-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        } catch (ioe: IOException) {
          assertThat(ioe).hasMessage("google.com")
          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
    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)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

        serverListener.assertClosing(1000, "goodbye")
    
        // Confirm that the hard cancel occurred after 500 ms.
        clientListener.assertFailure()
        val elapsedUntilFailure = System.nanoTime() - closeAtNanos
        assertThat(TimeUnit.NANOSECONDS.toMillis(elapsedUntilFailure).toDouble())
          .isCloseTo(500.0, 250.0)
    
        // Close the server and confirm it saw what we expected.
        server.close(1000, null)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

        val parts =
          MultipartReader(
            boundary = "simple boundary",
            source = Buffer(),
          )
    
        assertFailsWith<EOFException> {
          parts.nextPart()
        }
      }
    
      /** Confirm that [MultipartBody] and [MultipartReader] can work together. */
      @Test fun `multipart round trip`() {
        val body =
          MultipartBody.Builder("boundary")
            .setType(MultipartBody.PARALLEL)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

                else -> {
                  connectionUser.acquireConnectionNoEvents(connection)
                  true
                }
              }
            }
          if (!acquired) continue
    
          // Confirm the connection is healthy and return it.
          if (connection.isHealthy(doExtensiveHealthChecks)) return connection
    
          // In the second synchronized block, release the unhealthy acquired connection. We're also on
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top