You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Doron Cohen (Updated) (JIRA)" <ji...@apache.org> on 2011/10/25 14:34:32 UTC
[jira] [Updated] (LUCENE-3506) tests for verifying that assertions
are enabled do nothing since they ignore AssertionError
[ https://issues.apache.org/jira/browse/LUCENE-3506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doron Cohen updated LUCENE-3506:
--------------------------------
Attachment: LUCENE-3506.patch
Attached fix for this:
- assertionsEnabled() method added to LTC.
- tests that were no op were fixed to actually test that the assertion failed.
- after the fix, in trunk, analyzer's final'ness assertion tests failed because being final (class or method) is no longer needed in trunk. So these tests were removed in TestAssertions.
-- note: should not remove these tests when merging to 3x.
- TestSegmentMerger also failed with this fix - because it used the stale IW's SegmentInfos to create a compound segment. Fixed by reading a fresh SIS.
- only one test (TestAssertions.testbasics()) fails if assertions are not enabled. The other tests do not fail (though they do execute). I think that this was intended in the code, thought since it did not work it is hard to tell...
This is ready to commit.
> tests for verifying that assertions are enabled do nothing since they ignore AssertionError
> -------------------------------------------------------------------------------------------
>
> Key: LUCENE-3506
> URL: https://issues.apache.org/jira/browse/LUCENE-3506
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org