[
https://issues.apache.org/jira/browse/SOLR-13664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16898180#comment-16898180
]
ASF subversion and git services commented on SOLR-13664:
--------------------------------------------------------
Commit ab470a6564b1184c2d77892131f56a9912f7d8c6 in lucene-solr's branch
refs/heads/master from Chris M. Hostetter
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=ab470a6 ]
SOLR-13664: Fixed SolrTestCaseJ4.deleteCore() to properly reset the dataDir
used by initCore()
> SolrTestCaseJ4.deleteCore() does not delete/clean dataDir
> ----------------------------------------------------------
>
> Key: SOLR-13664
> URL: https://issues.apache.org/jira/browse/SOLR-13664
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Hoss Man
> Assignee: Hoss Man
> Priority: Major
> Attachments: SOLR-13664.patch, SOLR-13664.patch, SOLR-13664.patch,
> SOLR-13664.patch
>
>
> In spite of what it's javadocs say, {{SolrTestCaseJ4.deleteCore()}} does
> nothing to delete the dataDir used by the TestHarness
> The git history is a bit murky, so i'm not entirely certain when this stoped
> working, but I suspect it happened as part of the overall cleanup regarding
> test temp dirs and the use of {{LuceneTestCase.createTempDir(...) ->
> TestRuleTemporaryFilesCleanup}}
> While this is not problematic in many test classes, where a single
> {{initCore(...) is called in a {{@BeforeClass}} and the test then re-uses
> that SolrCore for all test methods and relies on {{@AfterClass
> SolrTestCaseJ4.teardownTestCases()}} to call {{deleteCore()}}, it's
> problematic in test classes where {{deleteCore()}} is explicitly called in an
> {{@After}} method to ensure a unique core (w/unique dataDir) is used for each
> test method.
> (there are currently about 61 tests that call {{deleteCore()}} directly)
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]