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

CLONE - expectedHeaderReceived should failed when no message is received

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Bug
    • 3.2.0
    • None
    • camel-test
    • None
    • Unknown

    Description

      I reopen this one because this is still not working as expected on latest camel version (3.2.0)

      This test should fail:

      import org.apache.camel.RoutesBuilder;
      import org.apache.camel.builder.RouteBuilder;
      import org.apache.camel.component.mock.MockEndpoint;
      import org.apache.camel.test.junit4.CamelTestSupport;
      import org.assertj.core.api.Assertions;
      import org.junit.Test;
      
      public class MyRouteTest extends CamelTestSupport {
      
        private static final String ROUTE_ID = "mytest";
      
        @Override
        public RoutesBuilder createRouteBuilder() throws Exception {
          return new RouteBuilder() {
      
            @Override
            public void configure() throws Exception {
              from("direct:foo")
                .id(ROUTE_ID)
                .to("mock:extract");
            }
          };
        }
      
        @Test
        public void shouldFail() throws InterruptedException {
          // given
          final MockEndpoint mock = getMockEndpoint("mock:extract");
      
          // declare
          mock.expectedHeaderReceived("foo", "bar");
      
          // when
      //template.sendBody("direct:foo", "test");
      
          // then
          mock.assertIsSatisfied();
        }
      }
      

      Because we were expecting some headers, but none headers were received

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            michael992 michael elbaz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment