| 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 { |