Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for ofSeconds (0.05 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt

            assertThat(chain.connectTimeoutMillis()).isEqualTo(100)
            chain.proceed(chain.request())
          }
        client =
          client
            .newBuilder()
            .connectTimeout(Duration.ofSeconds(5))
            .addInterceptor(interceptor1)
            .addInterceptor(interceptor2)
            .build()
        val request1 =
          Request
            .Builder()
            .url("http://" + TestUtil.UNREACHABLE_ADDRESS_IPV4)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 28.2K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        builder = builder.callTimeout(Duration.ofSeconds(0L))
        builder = builder.connectTimeout(0L, TimeUnit.SECONDS)
        builder = builder.connectTimeout(Duration.ofSeconds(0L))
        builder = builder.readTimeout(0L, TimeUnit.SECONDS)
        builder = builder.readTimeout(Duration.ofSeconds(0L))
        builder = builder.writeTimeout(0L, TimeUnit.SECONDS)
        builder = builder.writeTimeout(Duration.ofSeconds(0L))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/base/SuppliersTest.java

      }
    
      @J2ktIncompatible
      @GwtIncompatible // reflection
      public void testSuppliersNullChecks() throws Exception {
        new ClassSanityTester()
            .setDefault(Duration.class, Duration.ofSeconds(1))
            .forAllPublicStaticMethods(Suppliers.class)
            .testNulls();
      }
    
      @J2ktIncompatible
      @GwtIncompatible // reflection
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt

          client
            .newBuilder()
            .build()
            .routeDatabase,
        )
        assertSame(
          client.routeDatabase,
          client
            .newBuilder()
            .callTimeout(Duration.ofSeconds(5))
            .build()
            .routeDatabase,
        )
    
        // logically different scope of client for route db
        assertNotSame(
          client.routeDatabase,
          client
            .newBuilder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

      public void testTimeToLive_negative_duration() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder();
        assertThrows(
            IllegalArgumentException.class, () -> builder.expireAfterWrite(Duration.ofSeconds(-1)));
      }
    
      @SuppressWarnings("ReturnValueIgnored")
      public void testTimeToLive_small() {
        CacheBuilder.newBuilder().expireAfterWrite(1, NANOSECONDS).build(identityLoader());
        // well, it didn't blow up.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

      public void testTimeToLive_negative_duration() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder();
        assertThrows(
            IllegalArgumentException.class, () -> builder.expireAfterWrite(Duration.ofSeconds(-1)));
      }
    
      @SuppressWarnings("ReturnValueIgnored")
      public void testTimeToLive_small() {
        CacheBuilder.newBuilder().expireAfterWrite(1, NANOSECONDS).build(identityLoader());
        // well, it didn't blow up.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 25K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

        server.enqueue(MockResponse.Builder().onResponseStart(Stall).build())
        server.enqueue(MockResponse(body = "A"))
        client =
          client
            .newBuilder()
            .readTimeout(Duration.ofSeconds(1))
            .build()
    
        // Make a call expecting a timeout reading the response headers.
        val call1 = client.newCall(Request(server.url("/")))
        assertFailsWith<SocketTimeoutException> {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 73.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        ExecutorService executor = newFixedThreadPool(1);
        requestInterruptIn(500);
        executor.execute(new SleepTask(10000));
        executor.shutdown();
        assertFalse(awaitTerminationUninterruptibly(executor, Duration.ofSeconds(1)));
        assertFalse(executor.isTerminated());
        assertInterrupted();
      }
    
      public void testTryAwaitTerminationUninterruptiblyLongTimeUnit_success() {
        ExecutorService executor = newFixedThreadPool(1);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

            .throttleBody(1, 750, TimeUnit.MILLISECONDS)
            .build(),
        )
    
        // First request: time out after 1s.
        client =
          client
            .newBuilder()
            .readTimeout(Duration.ofSeconds(1))
            .build()
        executeSynchronously("/a").assertBody("abc")
    
        // Second request: time out after 250ms.
        client =
          client
            .newBuilder()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
Back to top