Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10247

OnException is overriding route Ids for the Route Definitions in the Camel Test

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.16.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Camel, Karaf

    • Estimated Complexity:
      Unknown

      Description

      When there is onException block in the Routes, Route Ids are overridden in the test (CBTS) class.

      Ex:

      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").id("foo")
      			.to("blah") 
      			.end();
      	}
      }
      

      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.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              srinivas@live.com Srinivas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: