Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for confirm (0.16 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        filesystem.setFaultyDelete(cacheDir / "a.1", true)
        taskFaker.runNextTask()
    
        // Confirm the partial snapshot is not returned.
        assertThat(cache["a"]).isNull()
    
        // Confirm we prevent edits after a trim failure.
        assertThat(cache.edit("a")).isNull()
    
        // Confirm the partial snapshot is not returned after a successful trim.
        filesystem.setFaultyDelete(cacheDir / "a.1", false)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        }.also { expected ->
          assertThat(expected.message).isEqualTo("timeout")
        }
    
        // Confirm that a subsequent request on the same connection is not impacted.
        val call2 = client.newCall(Request(server.url("/")))
        val response2 = call2.execute()
        assertThat(response2.body.string()).isEqualTo("A")
    
        // Confirm that the connection was reused.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  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/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)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

        taskRunner.lock.withLock {
          check(currentTask == TestThreadSerialTask)
          nanoTime = newTime
          yieldUntil(ResumePriority.AfterOtherTasks)
        }
      }
    
      /** Confirm all tasks have completed. Used by the test thread only. */
      fun assertNoMoreTasks() {
        taskRunner.assertThreadDoesntHoldLock()
    
        taskRunner.lock.withLock {
          assertThat(activeThreads).isEqualTo(0)
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
Back to top