You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gregory Chanan (JIRA)" <ji...@apache.org> on 2015/12/19 03:14:46 UTC

[jira] [Updated] (SOLR-8446) Allow failonerror to be configured for unit tests

     [ https://issues.apache.org/jira/browse/SOLR-8446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Chanan updated SOLR-8446:
---------------------------------
    Attachment: SOLR-8446.patch

Here's a trivial patch that makes failonerror configurable for the top-level "test" task.

This works for the use case above but depending on what you want to happen, you need to understand the ant structure a bit.  For example:
1) If the test task fails, no test report will be generated.  So you may have to specify -Dtests.ifNoTests=ignore as well or the task will still fail.  If all the lucene tests pass and the solr tests fail (or visa versa), the task will succeed even without specifying -Dtests.ifNoTests=ignore because the passing subdir will generate the report.
2) This setting affects the entire task, so calling "ant test" can pass even if say, compilation is broken.  You may want to specify something like "ant compile compile-test test" or similar to avoid this.

> Allow failonerror to be configured for unit tests
> -------------------------------------------------
>
>                 Key: SOLR-8446
>                 URL: https://issues.apache.org/jira/browse/SOLR-8446
>             Project: Solr
>          Issue Type: Improvement
>          Components: Tests
>            Reporter: Gregory Chanan
>            Assignee: Gregory Chanan
>         Attachments: SOLR-8446.patch
>
>
> Currently, failonerror is hard coded to false for the "test" task at the top level scope.  For jenkins runs, it would be useful to be able to configure this because:
> 1) unit tests runs are flaky
> 2) jenkins can detect test failures even if the the test task itself passes and mark the build yellow (which happens if failonerror is true)
> Therefore, this allows some nicer visualization of the jenkins history, i.e.:
> green if everything is good
> yellow if unit tests are failing (most likely flaky)
> red if compile / precommit, etc are broken



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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