[ 
https://issues.apache.org/jira/browse/SOLR-15054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17250662#comment-17250662
 ] 

Timothy Potter commented on SOLR-15054:
---------------------------------------

I think it was Mike's changes in this merge actually ->  ... Unless I'm missing 
something there [~erickerickson]. Regardless, I don't think the test logic 
should require {{private}} methods to be {{final}}. In fact, my IDE actually 
marks that as unnecessary ;-) So I think the right fix here is to change the 
test as follows: 

{code}
diff --git 
a/solr/core/src/test/org/apache/solr/core/ConfigureRecoveryStrategyTest.java 
b/solr/core/src/test/org/apache/solr/core/ConfigureRecoveryStrategyTest.java
index 0a988f6e747..246ed981137 100644
--- a/solr/core/src/test/org/apache/solr/core/ConfigureRecoveryStrategyTest.java
+++ b/solr/core/src/test/org/apache/solr/core/ConfigureRecoveryStrategyTest.java
@@ -66,7 +66,7 @@ public class ConfigureRecoveryStrategyTest extends 
SolrTestCaseJ4 {
 
   public void testAlmostAllMethodsAreFinal() throws Exception {
     for (Method m : RecoveryStrategy.class.getDeclaredMethods()) {
-      if (Modifier.isStatic(m.getModifiers())) continue;
+      if (Modifier.isStatic(m.getModifiers()) || 
Modifier.isPrivate(m.getModifiers())) continue;
       final String methodName = m.getName();
       if ("getReplicateLeaderUrl".equals(methodName)) {
         assertFalse(m.toString(), Modifier.isFinal(m.getModifiers()));
{code}

> Reproducible test failure 
> ConfigureRecoveryStrategyTest.testAlmostAllMethodsAreFinal
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-15054
>                 URL: https://issues.apache.org/jira/browse/SOLR-15054
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Tests
>    Affects Versions: master (9.0)
>            Reporter: Erick Erickson
>            Priority: Major
>
> Reproduce with:
> ./gradlew test --tests 
> ConfigureRecoveryStrategyTest.testAlmostAllMethodsAreFinal 
> -Dtests.seed=6E36F4B900CC2D0B -Dtests.multiplier=3 -Dtests.slow=true 
> -Dtests.locale=ccp -Dtests.timezone=ART -Dtests.asserts=true 
> -Dtests.file.encoding=UTF-8
> Git bisect identifies SOLR-12182 as the commit that introduced this, pinging 
> [~thelabdude]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to