shekharpro / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Add a [Duration] attribute for verifying that a test completes within a certain time interval. #404

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Add a [Duration] attribute for verifying that a test completes within a
certain time interval.

eg. [Duration(60)]

Original issue reported on code.google.com by jeff.br...@gmail.com on 12 Mar 2009 at 10:19

GoogleCodeExporter commented 8 years ago

Original comment by jeff.br...@gmail.com on 29 Jun 2009 at 8:33

GoogleCodeExporter commented 8 years ago
This one can be quite useful although it can also be abused...

Original comment by jeff.br...@gmail.com on 18 Jul 2009 at 5:23

GoogleCodeExporter commented 8 years ago
The tricky part is deciding whether we actually need [Duration] given that we 
already
have [Timeout].

What do you think?

Original comment by jeff.br...@gmail.com on 18 Jul 2009 at 5:24

GoogleCodeExporter commented 8 years ago
Mmh... I can's see the difference between [Timeout] and [Duration]. [Timeout] 
makes a 
test fail with an outcome 'Timeout' if the execution lasts more than X seconds. 
What 
would be the behavior of [Duration]? Can you enlighten me?

Original comment by Yann.Tre...@gmail.com on 24 Jul 2009 at 12:05

GoogleCodeExporter commented 8 years ago
I don't see much difference either.  I think I had something else in mind 
originally
but the distinction is too subtle.  Timeout aborts the test early but Duration
perhaps would let it run to completion.

Meh.  Let's leave it out after all!  :-)

Original comment by jeff.br...@gmail.com on 25 Jul 2009 at 6:44

GoogleCodeExporter commented 8 years ago
It would make more sense to cater for this using an assertion, no?

Original comment by andrew.m...@gmail.com on 5 Oct 2011 at 12:19