コード例 #1
0
  @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());
  }
コード例 #2
0
 @Test
 public void whenCallDoesntTimeout() {
   TestService testService = proxyProvider.getProxy(TestService.class);
   testService.fiveSecondTimeoutAndInterruptible(1000);
 }