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.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---