lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3506) tests for verifying that assertions are enabled do nothing since they ignore AssertionError
Date Tue, 25 Oct 2011 14:24:32 GMT


Doron Cohen commented on LUCENE-3506:

bq. (Whereas today if you run that test w/o assertions you get a failure, albeit a confusing

Actually today when you run the tests - with assertions, without assertions, - you get no
failures at all - which is what I was trying to fix here (unless I missed something seriously)
- because:
- the original tests, after deciding to fail, invoked fail()
- this threw AssertionError
- but it was ignored as part of their wrong logic. 

bq. I'm confused here – the changes to TestSegmentMerger look like they'll allow the test
to pass when assertions are disabled?

Right, I fixed it such that *only if* assertions are enabled, they verify that the expected
assertion errors are not thrown, so they allow you to run tests also without enabling assertions.
See my comment above "only one test...". I take it that this kind of flexibility is not required.
So will change it so that these tests will fail if assertions are not enabled.

bq. The other day I committed an accidental change to common-build that disabled assertions,
and it was a little confusing to track down.

I see, so we make the entire test framework to fail if assertions are not enabled.
I'll update the patch.
> tests for verifying that assertions are enabled do nothing since they ignore AssertionError
> -------------------------------------------------------------------------------------------
>                 Key: LUCENE-3506
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: general/test
>            Reporter: Doron Cohen
>            Assignee: Doron Cohen
>            Priority: Minor
>         Attachments: LUCENE-3506.patch
> Follow-up from LUCENE-3501

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message