You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2019/08/01 01:11:00 UTC
[jira] [Updated] (SOLR-13664) SolrTestCaseJ4.deleteCore() does not
delete/clean dataDir
[ 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)
Updated patch to:
* update all remaining tests that still refered to (the now deprecated {{initCoreDataDir}} ) to either use {{initAndGetDataDir()}} or just use {{createTempDir()}} when their usage never any reason to re-use the {{initCore()}} dataDir anyway
* fix a few precommit issues (unused imports).
I'm still testing, but i think this is ready...
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org