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

Method getRunnableResultTest

test/FutureTaskTest.java:53–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 }
52
53 private static void getRunnableResultTest() throws InterruptedException, ExecutionException {
54 final Object result = new Object();
55 FutureTask<Object> future = new FutureTask<Object>(new Runnable() {
56 @Override
57 public void run() {
58 // nothing here
59 }
60 }, result);
61
62 future.run();
63 if (future.get() != result) {
64 throw new RuntimeException("Bad result returned: " + future.get());
65 }
66 }
67
68 private static void getTimeoutFail() throws InterruptedException,
69 ExecutionException {

Callers 1

mainMethod · 0.95

Calls 2

runMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected