@Test public void testHystrixCommandTimeout() { assertThatExceptionOfType(HystrixRuntimeException.class).isThrownBy(() -> client.tellAJoke()); }
@HystrixCommand(groupKey = "joke-svc-broker", commandKey = "joke-svc-cmd", threadPoolKey = "joke-svc-pool") public String tellAJoke() { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return ""; }
JokeServiceStubClient { @HystrixCommand(groupKey = "joke-svc-broker", commandKey = "joke-svc-cmd", threadPoolKey = "joke-svc-pool") public String tellAJoke() { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return ""; } }
JokeServiceStubClient { @HystrixCommand(groupKey = "joke-svc-broker", commandKey = "joke-svc-cmd", threadPoolKey = "joke-svc-pool") public String tellAJoke() { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return ""; }  }
JokeServiceStubClient { @HystrixCommand(groupKey = "joke-svc-broker", commandKey = "joke-svc-cmd", threadPoolKey = "joke-svc-pool") public String tellAJoke() { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return ""; }  @HystrixCommand(groupKey = "joke-svc-broker", commandKey = "joke-svc-cmd", threadPoolKey = "joke-svc-pool") String tellAJoke(); }
JokeServiceStubClient { @HystrixCommand(groupKey = "joke-svc-broker", commandKey = "joke-svc-cmd", threadPoolKey = "joke-svc-pool") public String tellAJoke() { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return ""; }  @HystrixCommand(groupKey = "joke-svc-broker", commandKey = "joke-svc-cmd", threadPoolKey = "joke-svc-pool") String tellAJoke();  }