Home
last modified time | relevance | path

Searched refs:future (Results 1 – 13 of 13) sorted by relevance

/libcore/jsr166-tests/src/test/java/jsr166/
DAbstractExecutorServiceTest.java49 Future<?> future = e.submit(task); in testExecuteRunnable() local
50 assertNull(future.get()); in testExecuteRunnable()
51 assertNull(future.get(0, MILLISECONDS)); in testExecuteRunnable()
53 assertTrue(future.isDone()); in testExecuteRunnable()
54 assertFalse(future.isCancelled()); in testExecuteRunnable()
62 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
63 String result = future.get(); in testSubmitCallable()
72 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
73 future.get(); in testSubmitRunnable()
74 assertTrue(future.isDone()); in testSubmitRunnable()
[all …]
DForkJoinPoolTest.java217 Future<String> future = p.submit(new StringTask()); in testGetPoolSize() local
421 Future<?> future = e.submit(task); in testExecuteRunnable() local
422 assertNull(future.get()); in testExecuteRunnable()
423 assertNull(future.get(0, MILLISECONDS)); in testExecuteRunnable()
425 assertTrue(future.isDone()); in testExecuteRunnable()
426 assertFalse(future.isCancelled()); in testExecuteRunnable()
438 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
439 assertSame(TEST_STRING, future.get()); in testSubmitCallable()
440 assertTrue(future.isDone()); in testSubmitCallable()
441 assertFalse(future.isCancelled()); in testSubmitCallable()
[all …]
DScheduledExecutorTest.java750 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
751 String result = future.get(); in testSubmitCallable()
764 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
765 future.get(); in testSubmitRunnable()
766 assertTrue(future.isDone()); in testSubmitRunnable()
778 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
779 String result = future.get(); in testSubmitRunnable2()
940 for (Future<String> future : futures) in testInvokeAll5()
941 assertSame(TEST_STRING, future.get()); in testInvokeAll5()
1135 for (Future<String> future : futures) in testTimedInvokeAll5()
[all …]
DScheduledExecutorSubclassTest.java799 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
800 String result = future.get(); in testSubmitCallable()
813 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
814 future.get(); in testSubmitRunnable()
815 assertTrue(future.isDone()); in testSubmitRunnable()
827 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
828 String result = future.get(); in testSubmitRunnable2()
989 for (Future<String> future : futures) in testInvokeAll5()
990 assertSame(TEST_STRING, future.get()); in testInvokeAll5()
1184 for (Future<String> future : futures) in testTimedInvokeAll5()
[all …]
DThreadPoolExecutorTest.java1398 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
1399 String result = future.get(); in testSubmitCallable()
1415 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
1416 future.get(); in testSubmitRunnable()
1417 assertTrue(future.isDone()); in testSubmitRunnable()
1432 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
1433 String result = future.get(); in testSubmitRunnable2()
1626 for (Future<String> future : futures) in testInvokeAll5()
1627 assertSame(TEST_STRING, future.get()); in testInvokeAll5()
1857 for (Future<String> future : futures) in testTimedInvokeAll5()
[all …]
DThreadPoolExecutorSubclassTest.java1268 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
1269 String result = future.get(); in testSubmitCallable()
1282 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
1283 future.get(); in testSubmitRunnable()
1284 assertTrue(future.isDone()); in testSubmitRunnable()
1296 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
1297 String result = future.get(); in testSubmitRunnable2()
1458 for (Future<String> future : futures) in testInvokeAll5()
1459 assertSame(TEST_STRING, future.get()); in testInvokeAll5()
1653 for (Future<String> future : futures) in testTimedInvokeAll5()
[all …]
DJSR166TestCase.java444 void assertFutureTimesOut(Future future) { in assertFutureTimesOut() argument
445 assertFutureTimesOut(future, timeoutMillis()); in assertFutureTimesOut()
451 void assertFutureTimesOut(Future future, long timeoutMillis) { in assertFutureTimesOut() argument
454 future.get(timeoutMillis, MILLISECONDS); in assertFutureTimesOut()
459 } finally { future.cancel(true); } in assertFutureTimesOut()
DExecutorsTest.java271 Future future = executor.submit(sleeper); in testTimedCallable()
272 assertFutureTimesOut(future); in testTimedCallable()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLSocketTest.java320 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake() local
351 future.get(); in test_SSLSocket_startHandshake()
413 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noKeyStore() local
429 future.get(); in test_SSLSocket_startHandshake_noKeyStore()
443 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noClientCertificate() local
451 future.get(); in test_SSLSocket_startHandshake_noClientCertificate()
463 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_HandshakeCompletedListener() local
549 future.get(); in test_SSLSocket_HandshakeCompletedListener()
585 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_HandshakeCompletedListener_RuntimeException() local
598 future.get(); in test_SSLSocket_HandshakeCompletedListener_RuntimeException()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DOutputStreamTesterTest.java117 private Future<byte[]> future; field in OutputStreamTesterTest.PipedOutputStreamSinkTester
124 future = executor.submit(new Callable<byte[]>() { in create()
142 return future.get(); in getBytes()
DWriterTesterTest.java110 private Future<char[]> future; field in WriterTesterTest.PipedWriterCharSinkTester
117 future = executor.submit(new Callable<char[]>() { in create()
136 return future.get(); in getChars()
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DCopyOnWriteArrayListTest.java180 Future<?> future = executor.submit(new Runnable() { in testAddAllIsAtomic() local
199 future.get(); // this will throw the above exception in testAddAllIsAtomic()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
DJarFileTest.java678 Future<Boolean> future = executor.submit(new Callable<Boolean>() { in checkSignedJar() local
704 foundCerts = future.get(10, TimeUnit.SECONDS); in checkSignedJar()