MCPcopy Create free account
hub / github.com/ReadyTalk/avian / getCallableResultTest

Method getCallableResultTest

test/FutureTaskTest.java:38–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }
37
38 private static void getCallableResultTest() throws InterruptedException, ExecutionException {
39 final Object result = new Object();
40 FutureTask<Object> future = new FutureTask<Object>(new Callable<Object>() {
41 @Override
42 public Object call() throws Exception {
43 return result;
44 }
45 });
46
47 future.run();
48 if (future.get() != result) {
49 throw new RuntimeException("Bad result returned: " + future.get());
50 }
51 }
52
53 private static void getRunnableResultTest() throws InterruptedException, ExecutionException {
54 final Object result = new Object();

Callers 1

mainMethod · 0.95

Calls 2

runMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected