You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Thomas Diesler (JIRA)" <ji...@apache.org> on 2019/01/22 08:28:00 UTC

[jira] [Created] (CAMEL-13096) MockEndpoint may not respect expected minimum message count

Thomas Diesler created CAMEL-13096:
--------------------------------------

             Summary: MockEndpoint may not respect expected minimum message count
                 Key: CAMEL-13096
                 URL: https://issues.apache.org/jira/browse/CAMEL-13096
             Project: Camel
          Issue Type: Bug
          Components: camel-core
            Reporter: Thomas Diesler
            Assignee: Thomas Diesler
             Fix For: 3.0.0


A sequence like this ...

{code}
            mockEndpoint.expectedMinimumMessageCount(1);
            mockEndpoint.expectedHeaderReceived(CHANNEL, "subscriberChannel");
            mockEndpoint.assertIsSatisfied();
{code}

may fail when the number received messages is > 1.

This is because expectedHeaderReceived() implicitly sets the expectedMessageCount to 1, which will take priority over expectedMinimumMessageCount.

Instead, expectedHeaderReceived should implicitly set expectedMinimumMessageCount to 1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)