Searched refs:future (Results 1 - 14 of 14) sorted by relevance

/libcore/jsr166-tests/src/test/java/jsr166/
H A DAbstractExecutorServiceTest.java69 Future<?> future = e.submit(new CheckedRunnable() {
73 assertNull(future.get());
74 assertNull(future.get(0, MILLISECONDS));
76 assertTrue(future.isDone());
77 assertFalse(future.isCancelled());
85 Future<String> future = e.submit(new StringTask());
86 String result = future.get();
95 Future<?> future = e.submit(new NoOpRunnable());
96 future.get();
97 assertTrue(future
[all...]
H A DForkJoinPoolTest.java225 Future<String> future = p.submit(new StringTask());
425 Future<?> future = e.submit(new CheckedRunnable() {
429 assertNull(future.get());
430 assertNull(future.get(0, MILLISECONDS));
432 assertTrue(future.isDone());
433 assertFalse(future.isCancelled());
445 Future<String> future = e.submit(new StringTask());
446 assertSame(TEST_STRING, future.get());
447 assertTrue(future.isDone());
448 assertFalse(future
[all...]
H A DScheduledExecutorTest.java796 Future<String> future = e.submit(new StringTask());
797 String result = future.get();
810 Future<?> future = e.submit(new NoOpRunnable());
811 future.get();
812 assertTrue(future.isDone());
824 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING);
825 String result = future.get();
986 for (Future<String> future : futures)
987 assertSame(TEST_STRING, future.get());
1181 for (Future<String> future
[all...]
H A DScheduledExecutorSubclassTest.java850 Future<String> future = e.submit(new StringTask());
851 String result = future.get();
864 Future<?> future = e.submit(new NoOpRunnable());
865 future.get();
866 assertTrue(future.isDone());
878 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING);
879 String result = future.get();
1040 for (Future<String> future : futures)
1041 assertSame(TEST_STRING, future.get());
1235 for (Future<String> future
[all...]
H A DThreadPoolExecutorSubclassTest.java1297 Future<String> future = e.submit(new StringTask());
1298 String result = future.get();
1311 Future<?> future = e.submit(new NoOpRunnable());
1312 future.get();
1313 assertTrue(future.isDone());
1325 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING);
1326 String result = future.get();
1487 for (Future<String> future : futures)
1488 assertSame(TEST_STRING, future.get());
1682 for (Future<String> future
[all...]
H A DThreadPoolExecutorTest.java1425 Future<String> future = e.submit(new StringTask());
1426 String result = future.get();
1442 Future<?> future = e.submit(new NoOpRunnable());
1443 future.get();
1444 assertTrue(future.isDone());
1459 Future<String> future = e.submit(new NoOpRunnable(), TEST_STRING);
1460 String result = future.get();
1653 for (Future<String> future : futures)
1654 assertSame(TEST_STRING, future.get());
1884 for (Future<String> future
[all...]
H A DJSR166TestCase.java166 * milliseconds in the future.
466 * Checks that future.get times out, with the default timeout of
469 void assertFutureTimesOut(Future future) { argument
470 assertFutureTimesOut(future, timeoutMillis());
474 * Checks that future.get times out, with the given millisecond timeout.
476 void assertFutureTimesOut(Future future, long timeoutMillis) { argument
479 future.get(timeoutMillis, MILLISECONDS);
484 } finally { future.cancel(true); }
H A DExecutorsTest.java293 Future future = executor.submit(sleeper);
294 assertFutureTimesOut(future);
H A DFutureTaskTest.java236 * creating a future with a null callable throws NullPointerException
246 * creating a future with null runnable throws NullPointerException
837 for (Future<?> future : futures)
838 checkCompletedNormally(future, null);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DOutputStreamTesterTest.java117 private Future<byte[]> future; field in class:OutputStreamTesterTest.PipedOutputStreamSinkTester
124 future = executor.submit(new Callable<byte[]>() {
142 return future.get();
H A DWriterTesterTest.java110 private Future<char[]> future; field in class:WriterTesterTest.PipedWriterCharSinkTester
117 future = executor.submit(new Callable<char[]>() {
136 return future.get();
/libcore/luni/src/test/java/libcore/javax/net/ssl/
H A DSSLSocketTest.java337 Future<Void> future = executor.submit(new Callable<Void>() {
368 future.get();
431 Future<Void> future = executor.submit(new Callable<Void>() {
448 future.get();
461 Future<Void> future = executor.submit(new Callable<Void>() {
477 future.get();
491 Future<Void> future = executor.submit(new Callable<Void>() {
499 future.get();
511 Future<Void> future = executor.submit(new Callable<Void>() {
597 future
[all...]
/libcore/luni/src/test/java/libcore/java/util/concurrent/
H A DCopyOnWriteArrayListTest.java180 Future<?> future = executor.submit(new Runnable() {
199 future.get(); // this will throw the above exception
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
H A DJarFileTest.java678 Future<Boolean> future = executor.submit(new Callable<Boolean>() {
704 foundCerts = future.get(10, TimeUnit.SECONDS);

Completed in 500 milliseconds