Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for Records (0.24 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

          .isCloseTo(now.toDouble(), deltaMillis)
        assertThat(certificate.notAfter.time.toDouble())
          .isCloseTo(now.toDouble() + durationMillis, deltaMillis)
      }
    
      @Test
      fun customInterval() {
        // 5 seconds starting on 1970-01-01.
        val heldCertificate =
          HeldCertificate.Builder()
            .validityInterval(5000L, 10000L)
            .build()
        val certificate = heldCertificate.certificate
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  2. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        assertThat(Adapters.parseGeneralizedTime("19920622123421Z"))
          .isEqualTo(date("1992-06-22T12:34:21.000+0000").time)
      }
    
      @Disabled("fractional seconds are not implemented")
      @Test
      fun `parse generalized time with fractional seconds`() {
        assertThat(Adapters.parseGeneralizedTime("19920722132100.3Z"))
          .isEqualTo(date("1992-07-22T13:21:00.300+0000").time)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

          " cipherSuite=${handshake?.cipherSuite ?: "none"}" +
          " protocol=$protocol}"
      }
    
      companion object {
        const val IDLE_CONNECTION_HEALTHY_NS = 10_000_000_000 // 10 seconds.
    
        fun newTestConnection(
          taskRunner: TaskRunner,
          connectionPool: RealConnectionPool,
          route: Route,
          socket: Socket,
          idleAtNs: Long,
        ): RealConnection {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

            .build(),
        )
        var result = cachedDns.lookup("google.com")
        assertThat(result).containsExactly(address("157.240.1.18"))
        var recordedRequest = server.takeRequest(0, TimeUnit.SECONDS)
        assertThat(recordedRequest!!.method).isEqualTo("GET")
        assertThat(recordedRequest.path).isEqualTo(
          "/lookup?ct&dns=AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ",
        )
        Thread.sleep(2000)
    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. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

      fun testLoggingLevels() {
        enableTls()
    
        val testHandler =
          object : Handler() {
            val calls = mutableMapOf<String, AtomicInteger>()
    
            override fun publish(record: LogRecord) {
              calls.getOrPut(record.loggerName) { AtomicInteger(0) }
                .incrementAndGet()
            }
    
            override fun flush() {
            }
    
            override fun close() {
            }
          }.apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 27K bytes
    - Viewed (1)
  6. okhttp/src/main/kotlin/okhttp3/Cache.kt

     * efficient `max-age=0` directive instead:
     *
     * ```java
     * Request request = new Request.Builder()
     *     .cacheControl(new CacheControl.Builder()
     *         .maxAge(0, TimeUnit.SECONDS)
     *         .build())
     *     .url("http://publicobject.com/helloworld.txt")
     *     .build();
     * ```
     *
     * ## Force a Cache Response
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      /** Delay the response body by sleeping 1s.  */
      @Test
      fun delayResponse() {
        assumeNotWindows()
        server.enqueue(
          MockResponse()
            .setBody("ABCDEF")
            .setBodyDelay(1, TimeUnit.SECONDS),
        )
        val startNanos = System.nanoTime()
        val connection = server.url("/").toUrl().openConnection()
        val inputStream = connection.getInputStream()
        assertThat(inputStream.read()).isEqualTo('A'.code)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

          this.notBefore = notBefore
          this.notAfter = notAfter
        }
    
        /**
         * Sets the certificate to be valid immediately and until the specified duration has elapsed.
         * The precision of this field is seconds; further precision will be truncated.
         */
        fun duration(
          duration: Long,
          unit: TimeUnit,
        ) = apply {
          val now = System.currentTimeMillis()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.6K bytes
    - Viewed (1)
  9. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

        }
    
        /**
         * Sets the minimum number of seconds that a response will continue to be fresh for. If the
         * response will be stale when [minFresh] have elapsed, the cached response will not be used and
         * a network request will be made.
         *
         * @param minFresh a non-negative integer. This is stored and transmitted with
         *     [TimeUnit.SECONDS] precision; finer precision will be lost.
         */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/InterceptorTest.kt

        assertFailsWith<SocketTimeoutException> {
          call.execute()
        }
        val elapsedNanos = System.nanoTime() - startNanos
        org.junit.jupiter.api.Assertions.assertTrue(
          elapsedNanos < TimeUnit.SECONDS.toNanos(5),
          "Timeout should have taken ~100ms but was " + elapsedNanos / 1e6 + " ms",
        )
      }
    
      @Test
      fun chainWithReadTimeout() {
        val interceptor1 =
    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)
Back to top