Uploaded image for project: 'ServiceMix 4'
  1. ServiceMix 4
  2. SMX4-933

breadcrumbId header does not work with InOut exchange pattern in unit tests.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.3.0, 4.4.0
    • None
    • camel-nmr
    • None

    Description

      Here is unit test

      package org.apache.servicemix.camel.nmr;
      
      import org.apache.camel.Exchange;
      import org.apache.camel.ExchangePattern;
      import org.apache.camel.builder.RouteBuilder;
      import org.junit.Test;
      
      public class NMRBreadCrumbIDTest extends AbstractComponentTest {
      
          @Test
          public void noBreadCrumbID() throws Exception {
              Exchange exchange = createExchangeWithBody("Hello World");
              template.send("direct:start", exchange);
      
              assertNotNull(exchange.getIn().getHeader(Exchange.BREADCRUMB_ID));
              assertNotNull(exchange.getOut().getHeader(Exchange.BREADCRUMB_ID));
          }
      
          @Override
          protected RouteBuilder createRouteBuilder() throws Exception {
              return new RouteBuilder() {
                  @Override
                  public void configure() throws Exception {
                      from("direct:start")
                          .to(ExchangePattern.InOut, "nmr:child")
                          .to("mock:result");
                      from("nmr:child")
                          .setBody(constant("Bye World"));
                  }
              };
          }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            szhemzhitsky Sergey Zhemzhitsky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: