Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 66 for newBuilder (0.2 sec)

  1. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

            CacheBuilder.newBuilder().expireAfterWrite(10L, DAYS), CacheBuilder.from(spec));
      }
    
      public void testParse_writeExpirationHours() {
        CacheBuilderSpec spec = parse("expireAfterWrite=150h");
        assertEquals(HOURS, spec.writeExpirationTimeUnit);
        assertEquals(150L, spec.writeExpirationDuration);
        assertCacheBuilderEquivalence(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

        val differentDnsUrl = url.newBuilder().host("differentdns.com").build()
        assertFailsWith<IOException> {
          execute(differentDnsUrl)
        }
      }
    
      @Test
      fun skipsOnRedirectWhenDnsDontMatch() {
        server.enqueue(
          MockResponse.Builder()
            .code(301)
            .addHeader("Location", url.newBuilder().host("differentdns.com").build())
            .build(),
        )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            val sameHost = address.url.host
            val differentPort = address.url.port + 1
            chain.proceed(
              chain.request().newBuilder()
                .url("http://$sameHost:$differentPort/")
                .build(),
            )
          }
        client =
          client.newBuilder()
            .addNetworkInterceptor(interceptor)
            .build()
        val request =
          Request.Builder()
            .url(server.url("/"))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  4. compat/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java

        public void shouldInterpolateSourceDirectoryReferencedFromResourceDirectoryCorrectly() throws Exception {
            Model model = Model.newBuilder()
                    .build(Build.newBuilder()
                            .sourceDirectory("correct")
                            .resources(Arrays.asList(Resource.newBuilder()
                                    .directory("${project.build.sourceDirectory}")
                                    .build()))
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            .build().also {
              listener.satisfactionFailure(call, it)
            }
        }
    
        // If we don't need the network, we're done.
        if (networkRequest == null) {
          return cacheResponse!!.newBuilder()
            .cacheResponse(cacheResponse.stripBody())
            .build().also {
              listener.cacheHit(call, it)
            }
        }
    
        if (cacheResponse != null) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Mar 22 07:09:21 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/DuplexTest.kt

       */
      private fun enableProtocol(protocol: Protocol) {
        enableTls()
        client =
          client.newBuilder()
            .protocols(listOf(protocol, Protocol.HTTP_1_1))
            .build()
        server.protocols = client.protocols
      }
    
      private fun enableTls() {
        client =
          client.newBuilder()
            .sslSocketFactory(
              handshakeCertificates.sslSocketFactory(),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

            () -> CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1));
        assertThrows(
            IllegalStateException.class,
            () -> CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)));
      }
    
      @GwtIncompatible // weakKeys
      public void testKeyStrengthSetTwice() {
        CacheBuilder<Object, Object> builder1 = CacheBuilder.newBuilder().weakKeys();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

            CacheBuilder.newBuilder().expireAfterWrite(10L, DAYS), CacheBuilder.from(spec));
      }
    
      public void testParse_writeExpirationHours() {
        CacheBuilderSpec spec = parse("expireAfterWrite=150h");
        assertEquals(HOURS, spec.writeExpirationTimeUnit);
        assertEquals(150L, spec.writeExpirationDuration);
        assertCacheBuilderEquivalence(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        super.setUp();
    
        fakeTicker = new FakeTicker();
      }
    
      public void testLoader() throws ExecutionException {
    
        final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build();
    
        Callable<Integer> loader =
            new Callable<Integer>() {
              private int i = 0;
    
              @Override
              public Integer call() throws Exception {
                return ++i;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  10. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

      // 4. successful stale cached GET response
      // 5. unsuccessful response
      @Test
      fun usesCache() {
        val cache = Cache(cacheFs, "cache".toPath(), (100 * 1024).toLong())
        val cachedClient = bootstrapClient.newBuilder().cache(cache).build()
        val cachedDns = buildLocalhost(cachedClient, false)
    
        repeat(2) {
          server.enqueue(
            dnsResponse(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top