[
https://issues.apache.org/jira/browse/SOLR-13664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man updated SOLR-13664:
----------------------------
Attachment: SOLR-13664.patch
Status: Open (was: Open)
Here's an updated patch with a fix that i _think_ is good, but i'm still in the
process of testing and I want spend some more time thinking through possible
ramifications on third party subclasses.
The basic idea is that {{deleteCore()}} now nulls out the {{initCoreDataDir}}
variable -- w/o doing any actual IO deletion. We still trust/rely on
{{TestRuleTemporaryFilesCleanup}} to do it's job of deleting these temp dirs if
the test succeeds. Any place in {{SolrTestCaseJ4}} that currently depends on
{{initCoreDataDir}} being set now uses a private helper method to ensure it's
initialized.
> 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
>
>
> 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]