ssacher-tgm / mockito

Automatically exported from code.google.com/p/mockito
0 stars 0 forks source link

verify with 'timeout' #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Would be great to have a waitAndVerify Method for helping in asynchronous 
testing.

example (verify by waiting max 10 sec that the method process of my mock has 
been triggered with a specfic param:

waitAndverify(mock, 10000).process(param);

Original issue reported on code.google.com by frederic...@gmail.com on 10 Mar 2010 at 6:21

GoogleCodeExporter commented 8 years ago
What about something like this:

verify(mock, timeout(1000)).process(param);

Can you submit a patch + test? :)

Original comment by szcze...@gmail.com on 10 Mar 2010 at 10:26

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 10 Mar 2010 at 10:26

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 15 Mar 2010 at 9:30

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 17 Mar 2010 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 11 May 2010 at 6:44

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1974.

Original comment by szcze...@gmail.com on 11 May 2010 at 7:02

GoogleCodeExporter commented 8 years ago

Original comment by szcze...@gmail.com on 24 May 2010 at 7:58

GoogleCodeExporter commented 8 years ago
BTW, thanks a lot for the enhancement.

I have integrated it in my test suite and it works like a charm.

It is a really powerful tool when using mockito within integration tests where 
timing 
issues are not totally under control.

Original comment by frederic...@gmail.com on 1 Jun 2010 at 2:22