Home
last modified time | relevance | path

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

/libcore/jsr166-tests/src/test/java/jsr166/
DAbstractExecutorServiceTest.java70 Future<?> future = e.submit(new CheckedRunnable() { in testExecuteRunnable() local
74 assertNull(future.get()); in testExecuteRunnable()
75 assertNull(future.get(0, MILLISECONDS)); in testExecuteRunnable()
77 assertTrue(future.isDone()); in testExecuteRunnable()
78 assertFalse(future.isCancelled()); in testExecuteRunnable()
86 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
87 String result = future.get(); in testSubmitCallable()
96 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
97 future.get(); in testSubmitRunnable()
98 assertTrue(future.isDone()); in testSubmitRunnable()
[all …]
DForkJoinPoolTest.java232 Future<?> future = p.submit(task); in testGetPoolSize() local
430 Future<?> future = e.submit(new CheckedRunnable() { in testExecuteRunnable() local
434 assertNull(future.get()); in testExecuteRunnable()
435 assertNull(future.get(0, MILLISECONDS)); in testExecuteRunnable()
437 assertTrue(future.isDone()); in testExecuteRunnable()
438 assertFalse(future.isCancelled()); in testExecuteRunnable()
448 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
449 assertSame(TEST_STRING, future.get()); in testSubmitCallable()
450 assertTrue(future.isDone()); in testSubmitCallable()
451 assertFalse(future.isCancelled()); in testSubmitCallable()
[all …]
DThreadPoolExecutorTest.java1443 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
1444 String result = future.get(); in testSubmitCallable()
1458 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
1459 future.get(); in testSubmitRunnable()
1460 assertTrue(future.isDone()); in testSubmitRunnable()
1473 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
1474 String result = future.get(); in testSubmitRunnable2()
1654 for (Future<String> future : futures) in testInvokeAll5()
1655 assertSame(TEST_STRING, future.get()); in testInvokeAll5()
1878 for (Future<String> future : futures)
[all …]
DThreadPoolExecutorSubclassTest.java1436 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
1437 String result = future.get(); in testSubmitCallable()
1451 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
1452 future.get(); in testSubmitRunnable()
1453 assertTrue(future.isDone()); in testSubmitRunnable()
1466 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
1467 String result = future.get(); in testSubmitRunnable2()
1647 for (Future<String> future : futures) in testInvokeAll5()
1648 assertSame(TEST_STRING, future.get()); in testInvokeAll5()
1871 for (Future<String> future : futures)
[all …]
DScheduledExecutorSubclassTest.java886 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
887 String result = future.get(); in testSubmitCallable()
898 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
899 future.get(); in testSubmitRunnable()
900 assertTrue(future.isDone()); in testSubmitRunnable()
910 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
911 String result = future.get(); in testSubmitRunnable2()
1061 for (Future<String> future : futures) in testInvokeAll5()
1062 assertSame(TEST_STRING, future.get()); in testInvokeAll5()
1247 for (Future<String> future : futures)
[all …]
DScheduledExecutorTest.java835 Future<String> future = e.submit(new StringTask()); in testSubmitCallable() local
836 String result = future.get(); in testSubmitCallable()
847 Future<?> future = e.submit(new NoOpRunnable()); in testSubmitRunnable() local
848 future.get(); in testSubmitRunnable()
849 assertTrue(future.isDone()); in testSubmitRunnable()
859 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING); in testSubmitRunnable2() local
860 String result = future.get(); in testSubmitRunnable2()
1010 for (Future<String> future : futures) in testInvokeAll5()
1011 assertSame(TEST_STRING, future.get()); in testInvokeAll5()
1197 for (Future<String> future : futures)
[all …]
DJSR166TestCase.java943 for (Future<?> future : futures)
945 assertNull(future.get(LONG_DELAY_MS, MILLISECONDS));
1026 void assertFutureTimesOut(Future future) {
1027 assertFutureTimesOut(future, timeoutMillis());
1033 void assertFutureTimesOut(Future future, long timeoutMillis) {
1036 future.get(timeoutMillis, MILLISECONDS);
1041 } finally { future.cancel(true); }
DExecutorsTest.java293 Future future = executor.submit(sleeper); in testTimedCallable()
294 assertFutureTimesOut(future); in testTimedCallable()
DFutureTaskTest.java837 for (Future<?> future : futures) in testGet_NegativeInfinityTimeout()
838 checkCompletedNormally(future, null); in testGet_NegativeInfinityTimeout()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DSSLSocketTest.java350 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake() local
382 future.get(); in test_SSLSocket_startHandshake()
445 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_NoEnabledCipherSuites_Failure() local
462 future.get(); in test_SSLSocket_NoEnabledCipherSuites_Failure()
475 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noKeyStore() local
491 future.get(); in test_SSLSocket_startHandshake_noKeyStore()
505 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_startHandshake_noClientCertificate() local
513 future.get(); in test_SSLSocket_startHandshake_noClientCertificate()
525 Future<Void> future = executor.submit(new Callable<Void>() { in test_SSLSocket_HandshakeCompletedListener() local
612 future.get(); in test_SSLSocket_HandshakeCompletedListener()
[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/tzdata/tools/
Dtzupdate.properties4 # may become important in future so if inventing interim releases only add
/libcore/ojluni/src/main/java/java/io/
DObjectStreamClass.java317 EntryFuture future = null; in lookup() local
331 future = newEntry; in lookup()
339 future = (EntryFuture) entry; in lookup()
340 if (future.getOwner() == Thread.currentThread()) { in lookup()
349 entry = future.get(); in lookup()
358 if (future.set(entry)) { in lookup()
362 entry = future.get(); in lookup()
2124 EntryFuture future = null; in getReflector() local
2138 future = newEntry; in getReflector()
2152 future.set(entry); in getReflector()
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DCopyOnWriteArrayListTest.java181 Future<?> future = executor.submit(new Runnable() { in testAddAllIsAtomic() local
200 future.get(); // this will throw the above exception in testAddAllIsAtomic()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
DJarFileTest.java657 Future<Boolean> future = executor.submit(new Callable<Boolean>() { in checkSignedJar() local
683 foundCerts = future.get(10, TimeUnit.SECONDS); in checkSignedJar()