[
https://issues.apache.org/jira/browse/SOLR-5218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13760577#comment-13760577
]
Dawid Weiss commented on SOLR-5218:
-----------------------------------
We use a runner that does not follow all of JUnit conventions (and there are
reason why it doesn't). JUnit requires all hooks to be public methods but this
leads to accidental overrides and missed super calls. In RandomizedRunner a
private hook is always called, regardless of the shadowing/ override.
If you want to use a parameterized test, use RandomizedRunner's factory
instead, as is shown here:
https://github.com/carrotsearch/randomizedtesting/blob/master/examples/maven/src/main/java/com/carrotsearch/examples/randomizedrunner/Test007ParameterizedTests.java
> Unable to extend SolrJettyTestBase within a Parametrized test
> -------------------------------------------------------------
>
> Key: SOLR-5218
> URL: https://issues.apache.org/jira/browse/SOLR-5218
> Project: Solr
> Issue Type: Bug
> Components: Tests
> Affects Versions: 4.3.1
> Reporter: Steve Davids
> Fix For: 4.5, 5.0
>
>
> I would like to create a unit test that extends SolrJettyTestBase using the
> JUnit Parameterized test format. When I try to run the test I get the
> following messages:
> Method beforeClass() should be public & Method afterClass() should be public
> at java.lang.reflect.Constructor.newInstance(Unkown Source)...
> Obviously it would be great if we could make those public so I can use the
> JUnit Runner.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]