@Test public void whenTimeoutNotInterruptible() throws InterruptedException { TestService testService = proxyProvider.getProxy(TestService.class); try { testService.fiveSecondTimeoutNotInterruptible(10000); fail(); } catch (DistributedMethodTimeoutException expected) { } Thread.sleep(10000); assertFalse(pojo.testService.interrupted.get()); }
@Test public void whenCallDoesntTimeout() { TestService testService = proxyProvider.getProxy(TestService.class); testService.fiveSecondTimeoutAndInterruptible(1000); }