Home
last modified time | relevance | path

Searched refs:DELAY_MS (Results 1 – 4 of 4) sorted by relevance

/external/guava/guava-tests/test/com/google/common/util/concurrent/
DSimpleTimeLimiterTest.java40 private static final long DELAY_MS = 50; field in SimpleTimeLimiterTest
49 MILLISECONDS.sleep(DELAY_MS);
57 MILLISECONDS.sleep(DELAY_MS);
66 MILLISECONDS.sleep(DELAY_MS);
77 MILLISECONDS.sleep(DELAY_MS);
96 SampleImpl target = new SampleImpl(DELAY_MS); in testNewProxy_goodMethodWithEnoughTime()
103 assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(DELAY_MS, ENOUGH_MS)); in testNewProxy_goodMethodWithEnoughTime()
118 assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(NOT_ENOUGH_MS, DELAY_MS * 2)); in testNewProxy_goodMethodWithNotEnoughTime()
126 SampleImpl target = new SampleImpl(DELAY_MS); in testNewProxy_badMethodWithEnoughTime()
136 assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(DELAY_MS, ENOUGH_MS)); in testNewProxy_badMethodWithEnoughTime()
[all …]
DFakeTimeLimiterTest.java33 private static final int DELAY_MS = 50; field in FakeTimeLimiterTest
47 Callables.returning(RETURN_VALUE), DELAY_MS, TimeUnit.MILLISECONDS); in testCallWithTimeout_propagatesReturnValue()
55 timeLimiter.callWithTimeout(callableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS); in testCallWithTimeout_wrapsCheckedException() local
65 timeLimiter.callWithTimeout(callableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS); in testCallWithTimeout_wrapsUncheckedException() local
75 Callables.returning(RETURN_VALUE), DELAY_MS, TimeUnit.MILLISECONDS); in testCallUninterruptiblyWithTimeout_propagatesReturnValue()
81 timeLimiter.runWithTimeout(Runnables.doNothing(), DELAY_MS, TimeUnit.MILLISECONDS); in testRunWithTimeout_returnsWithoutException() local
87 timeLimiter.runWithTimeout(runnableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS); in testRunWithTimeout_wrapsUncheckedException() local
98 runnableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS); in testRunUninterruptiblyWithTimeout_wrapsUncheckedException() local
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DSimpleTimeLimiterTest.java40 private static final long DELAY_MS = 50; field in SimpleTimeLimiterTest
49 MILLISECONDS.sleep(DELAY_MS);
57 MILLISECONDS.sleep(DELAY_MS);
66 MILLISECONDS.sleep(DELAY_MS);
77 MILLISECONDS.sleep(DELAY_MS);
96 SampleImpl target = new SampleImpl(DELAY_MS); in testNewProxy_goodMethodWithEnoughTime()
103 assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(DELAY_MS, ENOUGH_MS)); in testNewProxy_goodMethodWithEnoughTime()
118 assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(NOT_ENOUGH_MS, DELAY_MS * 2)); in testNewProxy_goodMethodWithNotEnoughTime()
126 SampleImpl target = new SampleImpl(DELAY_MS); in testNewProxy_badMethodWithEnoughTime()
136 assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(DELAY_MS, ENOUGH_MS)); in testNewProxy_badMethodWithEnoughTime()
[all …]
DFakeTimeLimiterTest.java33 private static final int DELAY_MS = 50; field in FakeTimeLimiterTest
47 Callables.returning(RETURN_VALUE), DELAY_MS, TimeUnit.MILLISECONDS); in testCallWithTimeout_propagatesReturnValue()
55 timeLimiter.callWithTimeout(callableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS); in testCallWithTimeout_wrapsCheckedException() local
65 timeLimiter.callWithTimeout(callableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS); in testCallWithTimeout_wrapsUncheckedException() local
75 Callables.returning(RETURN_VALUE), DELAY_MS, TimeUnit.MILLISECONDS); in testCallUninterruptiblyWithTimeout_propagatesReturnValue()
81 timeLimiter.runWithTimeout(Runnables.doNothing(), DELAY_MS, TimeUnit.MILLISECONDS); in testRunWithTimeout_returnsWithoutException() local
87 timeLimiter.runWithTimeout(runnableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS); in testRunWithTimeout_wrapsUncheckedException() local
98 runnableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS); in testRunUninterruptiblyWithTimeout_wrapsUncheckedException() local