You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steven Rowe (Created) (JIRA)" <ji...@apache.org> on 2012/02/01 01:10:56 UTC
[jira] [Created] (LUCENE-3743) LuceneTestCase's uncaught exceptions
handler should check for AssumptionViolatedExceptions and then not trigger
test failure
LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
----------------------------------------------------------------------------------------------------------------------------
Key: LUCENE-3743
URL: https://issues.apache.org/jira/browse/LUCENE-3743
Project: Lucene - Java
Issue Type: Bug
Components: general/test
Affects Versions: 3.5
Reporter: Steven Rowe
Assignee: Steven Rowe
Priority: Minor
As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Commented] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197438#comment-13197438 ]
Uwe Schindler commented on LUCENE-3743:
---------------------------------------
I understand and the fix is fine, my problem was simply, that one should also add a short description of the issue that lead to the failure - thats all :-) If Steven would have put that into the issue description, I would not have complained :-)
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Commented] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197418#comment-13197418 ]
Uwe Schindler commented on LUCENE-3743:
---------------------------------------
I am not sure, if this is really a bug... Why would one do an assume in a thread, you would d this at the beginning of your test to check preconditions, but if its inside a thread its in my opinion somehow too late?
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Commented] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197435#comment-13197435 ]
Robert Muir commented on LUCENE-3743:
-------------------------------------
I really think this is the best solution for this U+FFFF issue, the problems:
1. its only on 3.x becuase the indexer will replace it with U+FFFD (does not happen in trunk)
2. there is likely no bug in an random generator, instead its generating escaped &#FFFF;, the assert happens at 'tokenizer' level (after charfilters processing)
3. trying to stop generators from generating strings like that is hard, especially since we test this htmlstripfilter 'chained' with MockCharFilter. for example MockCharFilter doubles characters 'randomly', and we test HtmlStrip *with* MockCharFilter too (a charfilter chain), so a random generator could make &#FF;, then MockCharFilter doubles the F's into &#FFFF;, then HtmlStrip turns it into FFFF.
for these reasons assume is the best, I added this as 'assert' originally because otherwise
its hard to track down why some random searching test fails. if the generators were really generating
this character tests would be failing left and right.
I dont think they are, I think its the situation described in 2 and 3 above. This is ridiculous to
spend a lot of time on, when we dont care to assert that this isn't happening, we just want to
not waste time on scary test failures.
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Updated] (LUCENE-3743) LuceneTestCase's uncaught exceptions
handler should check for AssumptionViolatedExceptions and then not trigger
test failure
Posted by "Steven Rowe (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Rowe updated LUCENE-3743:
--------------------------------
Attachment: LUCENE-3743.patch
Patch addressing the problem
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Updated] (LUCENE-3743) LuceneTestCase's uncaught exceptions
handler should check for AssumptionViolatedExceptions and then not trigger
test failure
Posted by "Steven Rowe (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Rowe updated LUCENE-3743:
--------------------------------
Affects Version/s: 4.0
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Commented] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Steven Rowe (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197448#comment-13197448 ]
Steven Rowe commented on LUCENE-3743:
-------------------------------------
bq. If Steven would have put that into the issue description, I would not have complained
You know, Uwe, I assumed that you would be asleep by now, rather than eagle-eye'ing JIRA in the middle of the night...
But seriously, I agree, I should have provided some rationale for this change.
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Fix For: 3.6, 4.0
>
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Commented] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197414#comment-13197414 ]
Robert Muir commented on LUCENE-3743:
-------------------------------------
definitely a bug... patch looks good to me.
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Commented] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197426#comment-13197426 ]
Uwe Schindler commented on LUCENE-3743:
---------------------------------------
With "precondition" I meant a precodnition of a test method like the ones we have for slow codecs...
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Commented] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Steven Rowe (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197427#comment-13197427 ]
Steven Rowe commented on LUCENE-3743:
-------------------------------------
Robert and I were looking at https://builds.apache.org/job/Lucene-Solr-tests-only-3.x-java7/1685/testReport/junit/org.apache.lucene.analysis.charfilter/HTMLStripCharFilterTest/testRandom/ -- random data is generated that contains charcter U+FFFF, and tracking down all the locations where that character is generated in all the random generators looked hard; Robert suggested an Assume to ignore test data containing U+FFFF.
>From #lucene IRC:
{noformat}
rmuir: maybe we should throw a junit assume or something
so it doesnt fail
but prevents you from wasting time
sarowe1: makes sense
rmuir: i think we can just 'throw new AssumptionViolatedException'
sarowe1: I'll give it a try
didn't work for me - it stops the run the same as assert
[...]
sarowe1: LuceneTestCase should ignore the failure???
rmuir: yeah
i think it should treat it as assume?
im not sure
hmm assume from another thread...
i think thats an LTC bug maybe
because from a single thread it works:
[...]
rmuir: we should fix that
{noformat}
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Commented] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197421#comment-13197421 ]
Robert Muir commented on LUCENE-3743:
-------------------------------------
I think you can have a situation where you want to assume in another thread...
it doesnt have to be a precondition... in fact the whole handling of assume doesnt
even work best as a precondition [in setUp] because you get no messages about it if you do that.
try it... its because the TestWatchMan does not intercept anything coming from setUp :)
anyway I think we should do the patch for consistency, and for those rare, crazy
situations where you want to make an assumption that isnt a precondition.
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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
[jira] [Resolved] (LUCENE-3743) LuceneTestCase's uncaught
exceptions handler should check for AssumptionViolatedExceptions and then
not trigger test failure
Posted by "Steven Rowe (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Rowe resolved LUCENE-3743.
---------------------------------
Resolution: Fixed
Fix Version/s: 4.0
3.6
Committed to trunk and branch_3x.
> LuceneTestCase's uncaught exceptions handler should check for AssumptionViolatedExceptions and then not trigger test failure
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3743
> URL: https://issues.apache.org/jira/browse/LUCENE-3743
> Project: Lucene - Java
> Issue Type: Bug
> Components: general/test
> Affects Versions: 3.5, 4.0
> Reporter: Steven Rowe
> Assignee: Steven Rowe
> Priority: Minor
> Fix For: 3.6, 4.0
>
> Attachments: LUCENE-3743.patch
>
>
> As in single-threaded tests, {{LuceneTestCase}} should not trigger test failures for {{AssumptionViolatedException}}'s when they occur in multi-threaded tests.
--
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