You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Gus Heck (Jira)" <ji...@apache.org> on 2020/02/26 15:40:00 UTC

[jira] [Updated] (SOLR-14283) Fix NPE in SolrTestCaseJ4

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

Gus Heck updated SOLR-14283:
----------------------------
    Summary: Fix NPE in SolrTestCaseJ4  (was: Fix NPE caused by SOLR-14217)

> Fix NPE in SolrTestCaseJ4
> -------------------------
>
>                 Key: SOLR-14283
>                 URL: https://issues.apache.org/jira/browse/SOLR-14283
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Tests
>    Affects Versions: 8.5
>            Reporter: Gus Heck
>            Assignee: Gus Heck
>            Priority: Blocker
>             Fix For: 8.5
>
>         Attachments: SOLR-14283.patch
>
>
> Though it's goals were laudable, SOLR-14217 ran afoul of an untested requirement that the SolrTestCaseJ4 class continue to function even if  ExternalPaths#SOURCE_HOME has been set to null by the logic in org.apache.solr.util.ExternalPaths#determineSourceHome
> The result is that in any almost all usages of the solr test framework outside of Solr that rely on SolrTestCaseJ4 or it's sub-classes including SolrCloudTestCase the following exception would be thrown:
> {code}
> java.lang.NullPointerException
> 	at __randomizedtesting.SeedInfo.seed([7A1D202DDAEA1C07]:0)
> 	at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
> 	at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
> 	at java.base/java.util.Properties.put(Properties.java:1337)
> 	at java.base/java.util.Properties.setProperty(Properties.java:225)
> 	at java.base/java.lang.System.setProperty(System.java:895)
> 	at org.apache.solr.SolrTestCaseJ4.setupTestCases(SolrTestCaseJ4.java:284)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750)
> 	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:878)
> 	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894)
> 	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> 	at com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:57)
> 	at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45)
> 	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> 	at org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:41)
> 	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
> 	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
> 	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> 	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> 	at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
> 	at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
> 	at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
> 	at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54)
> 	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
> 	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
> This ticket will fix the issue and provides a test so that we don't break nearly every user of the test framework other than ourselves in the future.



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

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