You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/04/20 06:14:20 UTC
[jira] [Resolved] (DRILL-475) TestJdbcQuery fails on Windows due to
resource leak
[ https://issues.apache.org/jira/browse/DRILL-475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Nadeau resolved DRILL-475.
----------------------------------
Resolution: Fixed
Resolved in 9c701e1
> TestJdbcQuery fails on Windows due to resource leak
> ---------------------------------------------------
>
> Key: DRILL-475
> URL: https://issues.apache.org/jira/browse/DRILL-475
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Aditya Kishore
> Assignee: Aditya Kishore
> Labels: tests, windows
>
> Two test case classes {{TestJdbcQuery}} and {{TestJdbcDistQuery}} both call
> {{org.apache.drill.exec.store.hive.HiveTestDataGenerator.generateTestData()}} during the test phase which starts with cleaning up of scratch directory.
> {noformat}
> public void generateTestData() throws Exception {
> // remove data from previous runs.
> cleanDir(DB_DIR);
> cleanDir(WH_DIR);
> ...
> {noformat}
> However the files opened by the first tests are not closed before the second test starts execution and hence the execution fails.
> {noformat}
> Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 32.005 sec - in org.apache.drill.jdbc.test.TestJdbcDistQuery
> Running org.apache.drill.jdbc.test.TestJdbcQuery
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.086 sec <<< FAILURE! - in org.apache.drill.jdbc.test.TestJdbcQuery
> org.apache.drill.jdbc.test.TestJdbcQuery Time elapsed: 0.086 sec <<< ERROR!
> java.io.IOException: Unable to delete file: \tmp\drill_hive_db\seg0\cf0.dat
> at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1919)
> at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1399)
> at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1331)
> at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1910)
> at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1399)
> at org.apache.drill.exec.store.hive.HiveTestDataGenerator.cleanDir(HiveTestDataGenerator.java:49)
> at org.apache.drill.exec.store.hive.HiveTestDataGenerator.generateTestData(HiveTestDataGenerator.java:57)
> at org.apache.drill.jdbc.test.TestJdbcQuery.generateHive(TestJdbcQuery.java:55)
> {noformat}
> A fix for this would require shutting down the Hive service(s) (Metastore?) between the test runs.
--
This message was sent by Atlassian JIRA
(v6.2#6252)