use of com.netflix.hystrix.HystrixThreadPool in project Hystrix by Netflix.
the class BasicHystrixTest method getThreadPoolProperties.
protected final HystrixThreadPoolProperties getThreadPoolProperties(HystrixInvokableInfo<?> command) {
try {
Field field = command.getClass().getSuperclass().getSuperclass().getSuperclass().getDeclaredField("threadPool");
field.setAccessible(true);
HystrixThreadPool threadPool = (HystrixThreadPool) field.get(command);
Field field2 = HystrixThreadPool.HystrixThreadPoolDefault.class.getDeclaredField("properties");
field2.setAccessible(true);
return (HystrixThreadPoolProperties) field2.get(threadPool);
} catch (NoSuchFieldException e) {
throw Throwables.propagate(e);
} catch (IllegalAccessException e) {
throw Throwables.propagate(e);
}
}
Aggregations