Hi

Yeah sure. Maybe have some option on dataset you can use to turn this
on|off so the old behavior can be the default still.

On Wed, Mar 9, 2016 at 9:50 PM, Quinn Stevenson
<qu...@pronoia-solutions.com> wrote:
> I would like to propose changing 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 <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 <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.
>
> I’ve figured out a way to do this, and I’d like to create a JIRA task and a 
> pull request for this if it sounds like an acceptable change.
>
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to