Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testTryAcquire_noWaitAllowed (0.32 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        rateLimiter.acquire(4); // R1.00, to repay previous
        rateLimiter.acquire(1); // R2.00, to repay previous
        assertEvents("R0.00", "R1.00", "R1.00", "R0.50", "R1.00", "R2.00");
      }
    
      public void testTryAcquire_noWaitAllowed() {
        RateLimiter limiter = RateLimiter.create(5.0, stopwatch);
        assertTrue(limiter.tryAcquire(0, SECONDS));
        assertFalse(limiter.tryAcquire(0, SECONDS));
        assertFalse(limiter.tryAcquire(0, SECONDS));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        rateLimiter.acquire(4); // R1.00, to repay previous
        rateLimiter.acquire(1); // R2.00, to repay previous
        assertEvents("R0.00", "R1.00", "R1.00", "R0.50", "R1.00", "R2.00");
      }
    
      public void testTryAcquire_noWaitAllowed() {
        RateLimiter limiter = RateLimiter.create(5.0, stopwatch);
        assertTrue(limiter.tryAcquire(0, SECONDS));
        assertFalse(limiter.tryAcquire(0, SECONDS));
        assertFalse(limiter.tryAcquire(0, SECONDS));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.8K bytes
    - Viewed (0)
Back to top