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

Change the default for DataSets used as sources to zero

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.17.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Change the current behavior of the DataSet component such that the expected message count defaults to zero for DataSets used as a source (i.e. DataSetConsumers).

      The reasoning behind this is as follows.

      I use the DataSet component for simple load testing. When I use a DataSet as a source (i.e. from(“dataset://my-dataset”) ), the assertMockEndpointsSatisfied() always fails because the expectedMessageSize is set to the size of the DataSet. I either have to explicitly set the expected message count on the endpoint to zero ( getMockEndpoint( “dataset://my-dataset”).expectedMessageCount( 0 ), or I have to assert all of the other mock endpoints individually (i.e not use assertMockEndpointsSatisfied() ).

      I rarely use the same dataset as both a source (i.e. from(“dataset://…”) ) and a target (i.e. to( “dataset://…”) ), so this behavior doesn’t make much sense to me. Additionally, I can’t use the same DataSet as the source and target when the source message count would be different than the target message count - which would be the case for a route that does some simple filtering, and all I want to assert is the correct number of messages came through.

        Attachments

          Activity

            People

            • Assignee:
              hqstevenson Quinn Stevenson
              Reporter:
              hqstevenson Quinn Stevenson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: