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

Method getExecutionExceptionTest

test/FutureTaskTest.java:89–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87 }
88
89 private static void getExecutionExceptionTest() throws InterruptedException, ExecutionException {
90 FutureTask<Object> future = new FutureTask<Object>(new Runnable() {
91 @Override
92 public void run() {
93 throw new RuntimeException();
94 }
95 }, null);
96
97 future.run();
98 try {
99 future.get();
100 throw new RuntimeException("Exception should have thrown");
101 } catch (ExecutionException e) {
102 // expected
103 }
104 }
105}

Callers 1

mainMethod · 0.95

Calls 2

runMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected