You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Shai Erera <se...@gmail.com> on 2011/03/29 10:45:12 UTC

Stop iterating if testsFailed

If I set tests.iter=X, then the test runs X times, even if an instance of
the test already failed. Would you mind if I change LTC to stop iterating if
a test instance failed? The fix is minor -- add 'if (testsFailed) break;' to
LTC.runChild().

Shai

Re: Stop iterating if testsFailed

Posted by Shai Erera <se...@gmail.com>.
Thanks Hoss. This is a good idea. I'll open an issue to track this.

Shai

On Tue, Mar 29, 2011 at 7:11 PM, Chris Hostetter
<ho...@fucit.org>wrote:

> : I see. On the other hand, it's a bit annoying when you run with X=100 for
> : the purpose of catching a multi-threaded bug, which occurs after the 2nd
> : iteration ...
> :
> : I can propose another parameter, tests.iter.break.on.failure, but it's
> too
> : much I guess :).
>
> suggestion:  add two params...
>
>        tests.iter.min=X
>        tests.iter.max=X
>
> ...make both default to tests.iter as a convinience
> lave the loop iterate up to tests.iter.max and break out if
> (tests.iter.min < counter && testFailed).
>
> people who want to see at least N iters run, but are willing to run up to
> X until/unless there are failures can use tests.iter.min=N,
> tests.iter.max=X
>
> people who want to run until first failure can use tests.iter.min=1,
> tests.iter.max=X.
>
> people who want to see how many failures there are in a set run size can
> (still) use tests.iter=X
>
>
>
> -Hoss
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: Stop iterating if testsFailed

Posted by Chris Hostetter <ho...@fucit.org>.
: I see. On the other hand, it's a bit annoying when you run with X=100 for
: the purpose of catching a multi-threaded bug, which occurs after the 2nd
: iteration ...
: 
: I can propose another parameter, tests.iter.break.on.failure, but it's too
: much I guess :).

suggestion:  add two params...

	tests.iter.min=X 
	tests.iter.max=X

...make both default to tests.iter as a convinience
lave the loop iterate up to tests.iter.max and break out if 
(tests.iter.min < counter && testFailed).

people who want to see at least N iters run, but are willing to run up to 
X until/unless there are failures can use tests.iter.min=N, 
tests.iter.max=X

people who want to run until first failure can use tests.iter.min=1, 
tests.iter.max=X.

people who want to see how many failures there are in a set run size can 
(still) use tests.iter=X



-Hoss

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Stop iterating if testsFailed

Posted by Robert Muir <rc...@gmail.com>.
On Tue, Mar 29, 2011 at 8:40 AM, Shai Erera <se...@gmail.com> wrote:
> I see. On the other hand, it's a bit annoying when you run with X=100 for
> the purpose of catching a multi-threaded bug, which occurs after the 2nd
> iteration ...

Yea I want both options too, just saying I want to somehow keep the
existing behavior if possible.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Stop iterating if testsFailed

Posted by Shai Erera <se...@gmail.com>.
I see. On the other hand, it's a bit annoying when you run with X=100 for
the purpose of catching a multi-threaded bug, which occurs after the 2nd
iteration ...

I can propose another parameter, tests.iter.break.on.failure, but it's too
much I guess :).

Shai

On Tue, Mar 29, 2011 at 1:38 PM, Robert Muir <rc...@gmail.com> wrote:

> personally I like the existing behavior for a lot of purposes though.
>
> when i'm trying to write a test for a bug, i use X=100 and look at the
> failure percentage.
>
> On Tue, Mar 29, 2011 at 4:45 AM, Shai Erera <se...@gmail.com> wrote:
> > If I set tests.iter=X, then the test runs X times, even if an instance of
> > the test already failed. Would you mind if I change LTC to stop iterating
> if
> > a test instance failed? The fix is minor -- add 'if (testsFailed) break;'
> to
> > LTC.runChild().
> >
> > Shai
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: Stop iterating if testsFailed

Posted by Robert Muir <rc...@gmail.com>.
personally I like the existing behavior for a lot of purposes though.

when i'm trying to write a test for a bug, i use X=100 and look at the
failure percentage.

On Tue, Mar 29, 2011 at 4:45 AM, Shai Erera <se...@gmail.com> wrote:
> If I set tests.iter=X, then the test runs X times, even if an instance of
> the test already failed. Would you mind if I change LTC to stop iterating if
> a test instance failed? The fix is minor -- add 'if (testsFailed) break;' to
> LTC.runChild().
>
> Shai
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org