@Test public void whenTimeoutAndInterruptible() throws InterruptedException { TestService testService = proxyProvider.getProxy(TestService.class); try { testService.fiveSecondTimeoutAndInterruptible(6000); fail(); } catch (DistributedMethodTimeoutException expected) { } Thread.sleep(2000); assertTrue(pojo.testService.interrupted.get()); }
@Test public void whenCallDoesntTimeout() { TestService testService = proxyProvider.getProxy(TestService.class); testService.fiveSecondTimeoutAndInterruptible(1000); }