Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for 500 (0.11 sec)

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

        // observe a size of 1
        long initialSize = cache.size();
        assertTrue(initialSize == 1 || initialSize == 2);
    
        // wait up to 5s
        byte[] filler = new byte[1024];
        for (int i = 0; i < 500; i++) {
          System.gc();
    
          CacheTesting.drainReferenceQueues(cache);
          if (cache.size() == 1) {
            break;
          }
          try {
            Thread.sleep(10);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.1K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

          future.addListener(listenerLatch::countDown, exec);
        }
    
        assertSame(Boolean.TRUE, future.get());
        // Wait for the listener latch to complete.
        listenerLatch.await(500, MILLISECONDS);
    
        exec.shutdown();
        exec.awaitTermination(500, MILLISECONDS);
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

          throws ExecutionException {
    
        repeatedlyInterruptTestThread(100, tearDownStack);
    
        assertThrows(
            TimeoutException.class,
            () -> getUninterruptibly(delayedFuture, 500, TimeUnit.MILLISECONDS));
        assertTrue(Thread.interrupted()); // clears the interrupt state, too
    
        assertFalse(sleeper.completed);
        assertTrue(getUninterruptibly(delayedFuture));
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

       */
      public void testInvalidatingRemove() {
        MinMaxPriorityQueue<Integer> mmHeap = MinMaxPriorityQueue.create();
        mmHeap.addAll(
            Lists.newArrayList(1, 20, 1000, 2, 3, 30, 40, 10, 11, 12, 13, 300, 400, 500, 600));
        assertEquals(15, mmHeap.size());
        assertTrue("Heap is not intact initially", mmHeap.isIntact());
        mmHeap.remove(12);
        assertEquals(14, mmHeap.size());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        boolean signaledBeforeTimeout = awaitUninterruptibly(condition, 500, MILLISECONDS);
    
        assertFalse(signaledBeforeTimeout);
        assertAtLeastTimePassed(stopwatch, 500);
        assertNotInterrupted();
      }
    
      public void testConditionAwaitTimeoutNotExceeded() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        Condition condition = TestCondition.createAndSignalAfter(500, MILLISECONDS);
    
    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)
  6. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        for (int i = 0; i < 8; i++) {
          limiter.acquire(); // #1
        }
        stopwatch.sleepMillis(500); // #2: to repay for the last acquire
        stopwatch.sleepMillis(4000); // #3: becomes cold again
        for (int i = 0; i < 8; i++) {
          limiter.acquire(); // // #4
        }
        stopwatch.sleepMillis(500); // #5: to repay for the last acquire
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        boolean signaledBeforeTimeout = awaitUninterruptibly(condition, 500, MILLISECONDS);
    
        assertFalse(signaledBeforeTimeout);
        assertAtLeastTimePassed(stopwatch, 500);
        assertNotInterrupted();
      }
    
      public void testConditionAwaitTimeoutNotExceeded() {
        Stopwatch stopwatch = Stopwatch.createStarted();
        Condition condition = TestCondition.createAndSignalAfter(500, MILLISECONDS);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 30.9K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/util/concurrent/SingleThreadAbstractFutureBenchmark.java

      }
    
      @Benchmark
      public long timeGetWithSmallTimeout(long reps) throws Exception {
        Facade<?> f = notDoneFuture;
        long r = 0;
        for (int i = 0; i < reps; i++) {
          try {
            f.get(500, TimeUnit.NANOSECONDS);
            r += 1;
          } catch (TimeoutException e) {
            r += 2;
          }
        }
        return r;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jul 16 17:22:27 GMT 2019
    - 3.6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

      public void testExpireAfterWriteAndAccess() {
        final Cache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .expireAfterWrite(1000, TimeUnit.MILLISECONDS)
                .expireAfterAccess(500, TimeUnit.MILLISECONDS)
                .ticker(fakeTicker)
                .build();
    
        cache.put(10, 100);
        cache.put(20, 200);
        cache.put(4, 2);
    
        fakeTicker.advance(499, TimeUnit.MILLISECONDS);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 15.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/HashingTest.java

      public void testGoodFastHash128() {
        HashTestUtils.check2BitAvalanche(Hashing.goodFastHash(128), 250, 0.20);
        HashTestUtils.checkAvalanche(Hashing.goodFastHash(128), 500, 0.17);
        HashTestUtils.checkNo2BitCharacteristics(Hashing.goodFastHash(128));
        HashTestUtils.checkNoFunnels(Hashing.goodFastHash(128));
        HashTestUtils.assertInvariants(Hashing.goodFastHash(128));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
Back to top