use of org.apache.camel.model.HystrixConfigurationDefinition in project camel by apache.
the class SpringHystrixRouteHierarchicalConfigTest method testHystrix.
@Test
public void testHystrix() throws Exception {
RouteDefinition routeDefinition = context.getRouteDefinition("hystrix-route");
HystrixDefinition hystrixDefinition = findHystrixDefinition(routeDefinition);
Assert.assertNotNull(hystrixDefinition);
HystrixProcessorFactory factory = new HystrixProcessorFactory();
HystrixConfigurationDefinition config = factory.buildHystrixConfiguration(context, hystrixDefinition);
Assert.assertEquals("local-conf-group-key", config.getGroupKey());
Assert.assertEquals("global-thread-key", config.getThreadPoolKey());
Assert.assertEquals(new Integer(5), config.getCorePoolSize());
getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
template.sendBody("direct:start", "Hello World");
assertMockEndpointsSatisfied();
}
Aggregations