You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2019/08/02 15:01:46 UTC

[HEADS UP] - Mock endpoints now fail fast

Hi

https://issues.apache.org/jira/browse/CAMEL-12003

When you use assertIsSatisifed with mock endpoints during testing then
they will now fail fast if a message arrived that would cause an
expectation to fail, and there are still more messages expected.

Before the mock endpoint would only validate expectations when the
number of expected message had arrived.

This is default enabled and you can turn it off by setting
failFast=false on the mock endpoint in your routes - to use 2.x
behaviour. But I dont expect people to want to use this (but just in
case).


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

Re: [HEADS UP] - Mock endpoints now fail fast

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Okay I think I have it fixed. So lets see next CI build

On Sat, Aug 3, 2019 at 10:00 AM Claus Ibsen <cl...@gmail.com> wrote:
>
> Hi
>
> Okay so there are some unit test errors (approx 35) on CI after this
> change. I will take a look over the weekend/monday.
> I had a hunch that maybe something would be affected as the test
> happens early now vs late.
>
> On Fri, Aug 2, 2019 at 5:01 PM Claus Ibsen <cl...@gmail.com> wrote:
> >
> > Hi
> >
> > https://issues.apache.org/jira/browse/CAMEL-12003
> >
> > When you use assertIsSatisifed with mock endpoints during testing then
> > they will now fail fast if a message arrived that would cause an
> > expectation to fail, and there are still more messages expected.
> >
> > Before the mock endpoint would only validate expectations when the
> > number of expected message had arrived.
> >
> > This is default enabled and you can turn it off by setting
> > failFast=false on the mock endpoint in your routes - to use 2.x
> > behaviour. But I dont expect people to want to use this (but just in
> > case).
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > http://davsclaus.com @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



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

Re: [HEADS UP] - Mock endpoints now fail fast

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Okay so there are some unit test errors (approx 35) on CI after this
change. I will take a look over the weekend/monday.
I had a hunch that maybe something would be affected as the test
happens early now vs late.

On Fri, Aug 2, 2019 at 5:01 PM Claus Ibsen <cl...@gmail.com> wrote:
>
> Hi
>
> https://issues.apache.org/jira/browse/CAMEL-12003
>
> When you use assertIsSatisifed with mock endpoints during testing then
> they will now fail fast if a message arrived that would cause an
> expectation to fail, and there are still more messages expected.
>
> Before the mock endpoint would only validate expectations when the
> number of expected message had arrived.
>
> This is default enabled and you can turn it off by setting
> failFast=false on the mock endpoint in your routes - to use 2.x
> behaviour. But I dont expect people to want to use this (but just in
> case).
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



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

Re: [HEADS UP] - Mock endpoints now fail fast

Posted by Andrea Cosentino <an...@gmail.com>.
+1

Il ven 2 ago 2019, 17:11 Pascal Schumacher <pa...@gmx.net> ha
scritto:

> +1
>
> Am 02.08.2019 um 17:01 schrieb Claus Ibsen:
> > Hi
> >
> > https://issues.apache.org/jira/browse/CAMEL-12003
> >
> > When you use assertIsSatisifed with mock endpoints during testing then
> > they will now fail fast if a message arrived that would cause an
> > expectation to fail, and there are still more messages expected.
> >
> > Before the mock endpoint would only validate expectations when the
> > number of expected message had arrived.
> >
> > This is default enabled and you can turn it off by setting
> > failFast=false on the mock endpoint in your routes - to use 2.x
> > behaviour. But I dont expect people to want to use this (but just in
> > case).
> >
> >
>
>

Re: [HEADS UP] - Mock endpoints now fail fast

Posted by Pascal Schumacher <pa...@gmx.net>.
+1

Am 02.08.2019 um 17:01 schrieb Claus Ibsen:
> Hi
>
> https://issues.apache.org/jira/browse/CAMEL-12003
>
> When you use assertIsSatisifed with mock endpoints during testing then
> they will now fail fast if a message arrived that would cause an
> expectation to fail, and there are still more messages expected.
>
> Before the mock endpoint would only validate expectations when the
> number of expected message had arrived.
>
> This is default enabled and you can turn it off by setting
> failFast=false on the mock endpoint in your routes - to use 2.x
> behaviour. But I dont expect people to want to use this (but just in
> case).
>
>