Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for ofMillis (0.19 sec)

  1. guava-tests/test/com/google/common/base/StopwatchJavaTimeTest.java

      public void testElapsed_duration() {
        stopwatch.start();
        ticker.advance(999999);
        assertEquals(Duration.ofNanos(999999), stopwatch.elapsed());
        ticker.advance(1);
        assertEquals(Duration.ofMillis(1), stopwatch.elapsed());
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        assertSame(ticker, ticker.advance(10));
        assertEquals(10, ticker.read());
        ticker.advance(1, TimeUnit.MILLISECONDS);
        assertEquals(1000010L, ticker.read());
        ticker.advance(Duration.ofMillis(1));
        assertEquals(2000010L, ticker.read());
      }
    
      public void testAutoIncrementStep_returnsSameInstance() {
        FakeTicker ticker = new FakeTicker();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  3. android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        assertSame(ticker, ticker.advance(10));
        assertEquals(10, ticker.read());
        ticker.advance(1, TimeUnit.MILLISECONDS);
        assertEquals(1000010L, ticker.read());
        ticker.advance(Duration.ofMillis(1));
        assertEquals(2000010L, ticker.read());
      }
    
      public void testAutoIncrementStep_returnsSameInstance() {
        FakeTicker ticker = new FakeTicker();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

        proxySelector.proxies.add(Proxy.NO_PROXY)
        server.shutdown()
    
        client =
          client.newBuilder()
            .proxySelector(proxySelector)
            .readTimeout(Duration.ofMillis(100))
            .connectTimeout(Duration.ofMillis(100))
            .build()
    
        val request = Request(server.url("/"))
        assertFailsWith<IOException> {
          client.newCall(request).execute()
        }.also { expected ->
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

      private val serverListener = WebSocketRecorder("server")
      private val random = Random(0)
      private var client =
        clientTestRule.newClientBuilder()
          .writeTimeout(Duration.ofMillis(500))
          .readTimeout(Duration.ofMillis(500))
          .addInterceptor(
            Interceptor { chain: Interceptor.Chain ->
              val response = chain.proceed(chain.request())
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  6. guava-tests/test/com/google/common/base/SuppliersTest.java

        CountingSupplier countingSupplier = new CountingSupplier();
    
        Supplier<Integer> memoizedSupplier =
            Suppliers.memoizeWithExpiration(countingSupplier, Duration.ofMillis(75));
    
        checkExpiration(countingSupplier, memoizedSupplier);
      }
    
      @SuppressWarnings("DoNotCall")
      public void testMemoizeWithExpiration_longTimeUnitNegative() throws InterruptedException {
        try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/SuppliersTest.java

        CountingSupplier countingSupplier = new CountingSupplier();
    
        Supplier<Integer> memoizedSupplier =
            Suppliers.memoizeWithExpiration(countingSupplier, Duration.ofMillis(75));
    
        checkExpiration(countingSupplier, memoizedSupplier);
      }
    
      @SuppressWarnings("DoNotCall")
      public void testMemoizeWithExpiration_longTimeUnitNegative() throws InterruptedException {
        try {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        ExecutorService executor = newFixedThreadPool(1);
        requestInterruptIn(500);
        executor.execute(new SleepTask(1000));
        executor.shutdown();
        assertTrue(awaitTerminationUninterruptibly(executor, Duration.ofMillis(LONG_DELAY_MS)));
        assertTrue(executor.isTerminated());
        assertInterrupted();
      }
    
      public void testTryAwaitTerminationUninterruptiblyDuration_failure() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

        ImmutableMap<Service, Duration> startupTimes = serviceManager.startupDurations();
        assertThat(startupTimes).hasSize(2);
        assertThat(startupTimes.get(a)).isAtLeast(Duration.ofMillis(150));
        assertThat(startupTimes.get(b)).isAtLeast(Duration.ofMillis(353));
      }
    
      public void testServiceStartupTimes_selfStartingServices() {
        // This tests to ensure that:
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.9K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

        server!!.enqueue(
          MockResponse.Builder()
            .headersDelay(2, TimeUnit.SECONDS)
            .build(),
        )
        client =
          client.newBuilder()
            .readTimeout(Duration.ofMillis(250))
            .build()
        val call =
          client.newCall(
            Request.Builder()
              .url(server!!.url("/"))
              .build(),
          )
        assertFailsWith<IOException> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.6K bytes
    - Viewed (0)
Back to top