You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/04/02 11:33:14 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13957493#comment-13957493 ]
ASF GitHub Bot commented on DRILL-475:
--------------------------------------
GitHub user adityakishore opened a pull request:
https://github.com/apache/incubator-drill/pull/43
DRILL-475: TestJdbcQuery fails on Windows due to resource leak
This fixes the test failure issue by launching each individual test in 'sql-parser' module in its own JVM.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/adityakishore/incubator-drill DRILL-475
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-drill/pull/43.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #43
----
commit ea4524111bf459377eca8b2c48a8c6ab0877e994
Author: Aditya Kishore <ad...@maprtech.com>
Date: 2014-04-02T09:26:30Z
DRILL-475: TestJdbcQuery fails on Windows due to resource leak
----
> 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)