[
https://issues.apache.org/jira/browse/CAMEL-10247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Srinivas updated CAMEL-10247:
-----------------------------
Description:
When there is onException block in the Routes, Route Ids are overridden in the
test (CBTS) class.
Ex: {code}
public class TestRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
onException(Exception.class).id("ExceptionId")
.maximumRedeliveries(0)
.handled(true)
.setHeader(Exchange.HTTP_RESPONSE_CODE).constant(HttpURLConnection.HTTP_NOT_FOUND)
.end()
.stop();
from("file:foo").routeId("foo")
.to("blah")
.end();
}
}
{code}
A Camel test (using Camel Blueprint Test Support) is written for the above
route, then found that Route Ids is overridden with "route1" in the route
definition. When OnException block code is commented, route id is replaced with
"foo" in the route definition in CBTS. This behavior can be reproduced
consistently.
Please let me know if this is known behavior or needs fix.
was:
When there is onException block in the Routes, Route Ids are overridden in the
test class.
Ex: {code}
public class TestRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
onException(Exception.class).id("ExceptionId")
.maximumRedeliveries(0)
.handled(true)
.setHeader(Exchange.HTTP_RESPONSE_CODE).constant(HttpURLConnection.HTTP_NOT_FOUND)
.end()
.stop();
from("file:foo").routeId("foo")
.to("blah")
.end();
}
}
{code}
A Camel test (using Camel Blueprint Test Support) is written for the above
route, then found that Route Ids is overridden with "route1" in the route
definition. When OnException block code is commented, route id is replaced with
"foo" in the route definition in CBTS. This behavior can be reproduced
consistently.
Please let me know if this is known behavior or needs fix.
> OnException is overriding route Ids for the Route Definitions in the Camel
> Test
> -------------------------------------------------------------------------------
>
> Key: CAMEL-10247
> URL: https://issues.apache.org/jira/browse/CAMEL-10247
> Project: Camel
> Issue Type: Bug
> Components: camel-blueprint, camel-core, camel-test
> Affects Versions: 2.16.2
> Environment: Camel, Karaf
> Reporter: Srinivas
> Assignee: Grzegorz Grzybek
>
> When there is onException block in the Routes, Route Ids are overridden in
> the test (CBTS) class.
> Ex: {code}
> public class TestRoute extends RouteBuilder {
> @Override
> public void configure() throws Exception {
> onException(Exception.class).id("ExceptionId")
> .maximumRedeliveries(0)
> .handled(true)
>
> .setHeader(Exchange.HTTP_RESPONSE_CODE).constant(HttpURLConnection.HTTP_NOT_FOUND)
> .end()
> .stop();
> from("file:foo").routeId("foo")
> .to("blah")
> .end();
> }
> }
> {code}
> A Camel test (using Camel Blueprint Test Support) is written for the above
> route, then found that Route Ids is overridden with "route1" in the route
> definition. When OnException block code is commented, route id is replaced
> with "foo" in the route definition in CBTS. This behavior can be reproduced
> consistently.
> Please let me know if this is known behavior or needs fix.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)