[
https://issues.apache.org/jira/browse/TAJO-1821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14733514#comment-14733514
]
ASF GitHub Bot commented on TAJO-1821:
--------------------------------------
Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/737#discussion_r38851050
--- Diff:
tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
---
@@ -64,18 +62,10 @@
static CatalogServer server;
static CatalogService catalog;
+ static String testDir;
- public static TajoConf newTajoConfForCatalogTest() throws IOException,
UnsupportedCatalogStore {
- return CatalogTestingUtil.configureCatalog(new TajoConf(),
setupClusterTestBuildDir().getAbsolutePath());
- }
-
- public static File setupClusterTestBuildDir() throws IOException {
- String randomStr = UUID.randomUUID().toString();
- String dirStr = CommonTestingUtil.getTestDir(randomStr).toString();
- File dir = new File(dirStr).getAbsoluteFile();
- // Have it cleaned up on exit
- dir.deleteOnExit();
- return dir;
+ public static TajoConf newTajoConfForCatalogTest(String testDir) throws
IOException, UnsupportedCatalogStore {
--- End diff --
It would be better if it returns a pair of TajoConf and auto-generated
directory instead of taking ``testDir``, especially if it is used to make a
temporary directory rather than a designated directory.
> Temporary data is not cleared after TestCatalog
> -----------------------------------------------
>
> Key: TAJO-1821
> URL: https://issues.apache.org/jira/browse/TAJO-1821
> Project: Tajo
> Issue Type: Bug
> Components: Unit Test
> Reporter: Jihoon Son
> Assignee: Jihoon Son
> Priority: Minor
> Fix For: 0.11.0
>
>
> TestCatalog creates a random directory and writes some data for testing.
> However, that directory is not removed properly after test.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)