Home
last modified time | relevance | path

Searched refs:MILLISECONDS (Results 1 – 25 of 46) sorted by relevance

12

/libcore/jsr166-tests/src/test/java/jsr166/
DThreadPoolExecutorTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
56 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in ExtendedTPE()
93 LONG_DELAY_MS, MILLISECONDS, in testExecute()
100 assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS)); in testExecute()
112 LONG_DELAY_MS, MILLISECONDS, in testGetActiveCount()
134 LONG_DELAY_MS, MILLISECONDS, in testPrestartCoreThread()
160 LONG_DELAY_MS, MILLISECONDS, in testPrestartAllCoreThreads()
183 LONG_DELAY_MS, MILLISECONDS, in testGetCompletedTaskCount()
216 LONG_DELAY_MS, MILLISECONDS, in testGetCorePoolSize()
229 1000, MILLISECONDS, in testGetKeepAliveTime()
[all …]
DTimeUnitTest.java14 import static java.util.concurrent.TimeUnit.MILLISECONDS;
52 SECONDS.convert(1000L*t, MILLISECONDS)); in testConvert()
59 MILLISECONDS.convert(t, DAYS)); in testConvert()
61 MILLISECONDS.convert(t, HOURS)); in testConvert()
63 MILLISECONDS.convert(t, MINUTES)); in testConvert()
65 MILLISECONDS.convert(t, SECONDS)); in testConvert()
67 MILLISECONDS.convert(t, MILLISECONDS)); in testConvert()
69 MILLISECONDS.convert(1000L*t, MICROSECONDS)); in testConvert()
71 MILLISECONDS.convert(1000000L*t, NANOSECONDS)); in testConvert()
82 MICROSECONDS.convert(t, MILLISECONDS)); in testConvert()
[all …]
DThreadPoolExecutorSubclassTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
203 super(1, 1, LONG_DELAY_MS, MILLISECONDS, new SynchronousQueue<Runnable>()); in CustomTPE()
240 2 * LONG_DELAY_MS, MILLISECONDS, in testExecute()
247 assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS)); in testExecute()
259 LONG_DELAY_MS, MILLISECONDS, in testGetActiveCount()
281 LONG_DELAY_MS, MILLISECONDS, in testPrestartCoreThread()
307 LONG_DELAY_MS, MILLISECONDS, in testPrestartAllCoreThreads()
330 LONG_DELAY_MS, MILLISECONDS, in testGetCompletedTaskCount()
363 LONG_DELAY_MS, MILLISECONDS, in testGetCorePoolSize()
376 1000, MILLISECONDS, in testGetKeepAliveTime()
[all …]
DExchangerTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
59 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
60 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
64 assertSame(two, e.exchange(one, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
65 assertSame(one, e.exchange(two, LONG_DELAY_MS, MILLISECONDS)); in testTimedExchange()
98 e.exchange(null, LONG_DELAY_MS, MILLISECONDS); in testTimedExchange_InterruptedException()
115 e.exchange(null, timeoutMillis(), MILLISECONDS); in testExchange_TimeoutException()
DScheduledExecutorTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
59 assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS)); in testExecute()
77 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1()
80 assertTrue(done.await(0L, MILLISECONDS)); in testSchedule1()
97 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3()
99 assertNull(f.get(LONG_DELAY_MS, MILLISECONDS)); in testSchedule3()
119 LONG_DELAY_MS, MILLISECONDS); in testSchedule4()
141 LONG_DELAY_MS, MILLISECONDS); in testSchedule5()
168 p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); in testFixedRateSequence()
214 p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); in testFixedDelaySequence()
[all …]
DScheduledExecutorSubclassTest.java9 import static java.util.concurrent.TimeUnit.MILLISECONDS;
134 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1()
153 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3()
155 assertNull(f.get(LONG_DELAY_MS, MILLISECONDS)); in testSchedule3()
175 LONG_DELAY_MS, MILLISECONDS); in testSchedule4()
197 LONG_DELAY_MS, MILLISECONDS); in testSchedule5()
224 p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); in testFixedRateSequence()
270 p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); in testFixedDelaySequence()
305 Future f = p.schedule(callable, SHORT_DELAY_MS, MILLISECONDS); in testScheduleNull()
320 MEDIUM_DELAY_MS, MILLISECONDS); in testSchedule1_RejectedExecutionException()
[all …]
DBlockingQueueTest.java12 import static java.util.concurrent.TimeUnit.MILLISECONDS;
95 q.offer(null, LONG_DELAY_MS, MILLISECONDS); in testTimedOfferNull()
222 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPollWithOffer()
227 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
231 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollWithOffer()
238 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollWithOffer()
248 assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
308 q.poll(2 * LONG_DELAY_MS, MILLISECONDS);
330 q.poll(2 * LONG_DELAY_MS, MILLISECONDS);
DCountDownLatchTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
97 assertTrue(l.await(LONG_DELAY_MS, MILLISECONDS)); in testTimedAwait()
152 l.await(LONG_DELAY_MS, MILLISECONDS); in testTimedAwait_Interruptible()
159 l.await(LONG_DELAY_MS, MILLISECONDS); in testTimedAwait_Interruptible()
181 assertFalse(l.await(timeoutMillis(), MILLISECONDS)); in testAwaitTimeout()
DLinkedBlockingDequeTest.java9 import static java.util.concurrent.TimeUnit.MILLISECONDS;
653 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOffer()
657 q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS); in testTimedOffer()
728 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
730 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
740 assertEquals(i, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
744 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
760 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
764 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
883 assertFalse(q.offerFirst(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOfferFirst()
[all …]
DAbstractExecutorServiceTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
75 assertNull(future.get(0, MILLISECONDS)); in testExecuteRunnable()
202 assertTrue(quittingTime.await(2*LONG_DELAY_MS, MILLISECONDS)); in testInterruptedSubmit()
399 e.invokeAny(null, MEDIUM_DELAY_MS, MILLISECONDS); in testTimedInvokeAny1()
428 MEDIUM_DELAY_MS, MILLISECONDS); in testTimedInvokeAny2()
445 e.invokeAny(l, MEDIUM_DELAY_MS, MILLISECONDS); in testTimedInvokeAny3()
461 e.invokeAny(l, LONG_DELAY_MS, MILLISECONDS); in testTimedInvokeAny4()
480 String result = e.invokeAny(l, LONG_DELAY_MS, MILLISECONDS);
493 e.invokeAll(null, MEDIUM_DELAY_MS, MILLISECONDS);
520 …<Future<String>> r = e.invokeAll(new ArrayList<Callable<String>>(), MEDIUM_DELAY_MS, MILLISECONDS);
[all …]
DSynchronousQueueTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
199 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOffer()
203 q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS); in testTimedOffer()
231 try { assertNull(q.poll(0, MILLISECONDS)); } in testTimedPoll0()
243 try { assertNull(q.poll(timeoutMillis(), MILLISECONDS)); } in testTimedPoll() local
261 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPollWithOffer()
266 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
270 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollWithOffer()
277 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollWithOffer()
287 try { assertTrue(q.offer(zero, LONG_DELAY_MS, MILLISECONDS)); } in testTimedPollWithOffer()
[all …]
DCyclicBarrierTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
161 c.await(LONG_DELAY_MS, MILLISECONDS); in testAwait2_Interrupted_BrokenBarrier()
166 c.await(LONG_DELAY_MS, MILLISECONDS); in testAwait2_Interrupted_BrokenBarrier()
186 c.await(timeoutMillis(), MILLISECONDS); in testAwait3_TimeoutException()
204 c.await(LONG_DELAY_MS, MILLISECONDS); in testAwait4_Timeout_BrokenBarrier()
213 c.await(timeoutMillis(), MILLISECONDS); in testAwait4_Timeout_BrokenBarrier()
241 c.await(timeoutMillis(), MILLISECONDS); in testAwait5_Timeout_BrokenBarrier()
413 barrier.await(timeoutMillis(), MILLISECONDS); in testResetAfterTimeout()
DForkJoinPoolTest.java9 import static java.util.concurrent.TimeUnit.MILLISECONDS;
250 assertFalse(p.awaitTermination(Long.MIN_VALUE, MILLISECONDS)); in testAwaitTermination_timesOut()
252 assertFalse(p.awaitTermination(-1L, MILLISECONDS)); in testAwaitTermination_timesOut()
254 assertFalse(p.awaitTermination(0L, MILLISECONDS)); in testAwaitTermination_timesOut()
262 assertFalse(p.awaitTermination(timeoutMillis, MILLISECONDS)); in testAwaitTermination_timesOut()
266 assertTrue(p.awaitTermination(LONG_DELAY_MS, MILLISECONDS)); in testAwaitTermination_timesOut()
435 assertNull(future.get(0, MILLISECONDS)); in testExecuteRunnable()
576 assertTrue(quittingTime.await(2*LONG_DELAY_MS, MILLISECONDS)); in testInterruptedSubmit()
786 e.invokeAny(null, MEDIUM_DELAY_MS, MILLISECONDS); in testTimedInvokeAny1()
815 MEDIUM_DELAY_MS, MILLISECONDS); in testTimedInvokeAny2()
[all …]
DStampedLockTest.java10 import static java.util.concurrent.TimeUnit.MILLISECONDS;
255 assertTrue((s = lock.tryWriteLock(100L, MILLISECONDS)) != 0L); in testValidate()
258 assertTrue((s = lock.tryReadLock(100L, MILLISECONDS)) != 0L); in testValidate()
273 assertFalse(lock.validate(lock.tryWriteLock(10L, MILLISECONDS))); in testValidate2()
275 assertFalse(lock.validate(lock.tryReadLock(10L, MILLISECONDS))); in testValidate2()
311 lock.tryWriteLock(2 * LONG_DELAY_MS, MILLISECONDS); in testWriteTryLock_Interruptible()
352 lock.tryReadLock(2 * LONG_DELAY_MS, MILLISECONDS); in testReadTryLock_Interruptible()
418 long s3 = lock.tryReadLock(LONG_DELAY_MS, MILLISECONDS); in testMultipleReadLocks()
542 long ws = lock.tryWriteLock(timeoutMillis, MILLISECONDS); in testWriteTryLock_Timeout()
561 long rs = lock.tryReadLock(timeoutMillis, MILLISECONDS); in testReadTryLock_Timeout()
[all …]
DLinkedTransferQueueTest.java10 import static java.util.concurrent.TimeUnit.MILLISECONDS;
264 assertEquals(i, (int) q.poll(0, MILLISECONDS)); in testTimedPoll0()
266 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
277 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
281 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
297 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
300 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
324 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollAfterInterrupt()
326 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollAfterInterrupt()
610 assertTrue(q.offer(one, LONG_DELAY_MS, MILLISECONDS)); in testOfferInExecutor()
[all …]
DCollection8Test.java10 import static java.util.concurrent.TimeUnit.MILLISECONDS;
99 assertNull(f1.get(0L, MILLISECONDS)); in testForEachConcurrentStressTest()
100 assertNull(f2.get(0L, MILLISECONDS)); in testForEachConcurrentStressTest()
DDelayQueueTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
336 assertTrue(q.offer(new PDelay(0), SHORT_DELAY_MS, MILLISECONDS)); in testTimedOffer()
337 assertTrue(q.offer(new PDelay(0), LONG_DELAY_MS, MILLISECONDS)); in testTimedOffer()
403 assertEquals(new PDelay(i), q.poll(0, MILLISECONDS)); in testTimedPoll0()
405 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
415 assertEquals(new PDelay(i), q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
419 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
436 ((PDelay)q.poll(LONG_DELAY_MS, MILLISECONDS))); in testInterruptedTimedPoll()
441 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
448 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
[all …]
DPriorityBlockingQueueTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
306 assertTrue(q.offer(new Integer(0), SHORT_DELAY_MS, MILLISECONDS)); in testTimedOffer()
307 assertTrue(q.offer(new Integer(0), LONG_DELAY_MS, MILLISECONDS)); in testTimedOffer()
373 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
375 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
385 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
389 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
405 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
409 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
638 assertSame(one, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testPollInExecutor()
DExecutorsTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
212 timeoutMillis(), MILLISECONDS); in testNewSingleThreadScheduledExecutor()
215 assertSame(Boolean.TRUE, f.get(LONG_DELAY_MS, MILLISECONDS)); in testNewSingleThreadScheduledExecutor()
236 timeoutMillis(), MILLISECONDS); in testNewScheduledThreadPool()
239 assertSame(Boolean.TRUE, f.get(LONG_DELAY_MS, MILLISECONDS)); in testNewScheduledThreadPool()
262 timeoutMillis(), MILLISECONDS); in testUnconfigurableScheduledExecutorService()
265 assertSame(Boolean.TRUE, f.get(LONG_DELAY_MS, MILLISECONDS)); in testUnconfigurableScheduledExecutorService()
DLinkedBlockingQueueTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
345 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOffer()
349 q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS); in testTimedOffer()
420 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
422 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
432 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
436 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
452 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
456 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
737 assertTrue(q.offer(three, LONG_DELAY_MS, MILLISECONDS)); in testOfferInExecutor()
[all …]
DFutureTaskTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
309 assertSame(one, task.get(LONG_DELAY_MS, MILLISECONDS)); in testSet()
334 task.get(LONG_DELAY_MS, MILLISECONDS); in testSetException_get()
564 assertSame(two, task.get(2*LONG_DELAY_MS, MILLISECONDS)); in testGetRun()
603 assertSame(two, task.get(2*LONG_DELAY_MS, MILLISECONDS)); in testGetSet()
656 task.get(2*LONG_DELAY_MS, MILLISECONDS); in testTimedGet_Cancellation()
712 task.get(LONG_DELAY_MS, MILLISECONDS); in testTimedGet_ExecutionException2()
760 task.get(2*LONG_DELAY_MS, MILLISECONDS); in testTimedGet_interruptible()
767 task.get(2*LONG_DELAY_MS, MILLISECONDS); in testTimedGet_interruptible()
786 task.get(timeoutMillis(), MILLISECONDS); in testGet_TimeoutException() local
DPhaserTest.java10 import static java.util.concurrent.TimeUnit.MILLISECONDS;
485 phaser.awaitAdvanceInterruptibly(0, 2*LONG_DELAY_MS, MILLISECONDS);
492 phaser.awaitAdvanceInterruptibly(0, 2*LONG_DELAY_MS, MILLISECONDS);
692 assertEquals(-42, phaser.awaitAdvanceInterruptibly(-42, MEDIUM_DELAY_MS, MILLISECONDS));
700 assertEquals(-42, phaser.awaitAdvanceInterruptibly(-42, MEDIUM_DELAY_MS, MILLISECONDS));
703 assertEquals(1, phaser.awaitAdvanceInterruptibly(0, MEDIUM_DELAY_MS, MILLISECONDS));
711 assertEquals(-42, phaser.awaitAdvanceInterruptibly(-42, MEDIUM_DELAY_MS, MILLISECONDS));
714 assertEquals(2, phaser.awaitAdvanceInterruptibly(0, MEDIUM_DELAY_MS, MILLISECONDS));
717 assertEquals(2, phaser.awaitAdvanceInterruptibly(1, MEDIUM_DELAY_MS, MILLISECONDS));
DArrayBlockingQueueTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
355 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOffer()
359 q.offer(new Object(), 2 * LONG_DELAY_MS, MILLISECONDS); in testTimedOffer()
430 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
432 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
443 assertEquals(i, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
447 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
463 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
467 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
803 assertTrue(q.offer(three, LONG_DELAY_MS, MILLISECONDS)); in testOfferInExecutor()
[all …]
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DThreadPoolExecutorTest.java31 1000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(10)); in testCorePoolSizeGreaterThanMax()
/libcore/luni/src/test/java/libcore/java/lang/ref/
DReferenceQueueTest.java111 countedDown = cdl.await(1000, TimeUnit.MILLISECONDS); in testCleanersCleaned()
125 executor.schedule(runnable, delayMillis, TimeUnit.MILLISECONDS); in runLater()

12