You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Vladimir Sitnikov (JIRA)" <ji...@apache.org> on 2019/02/02 09:22:00 UTC

[jira] [Created] (DRILL-7025) Running Drill unit tests from within IntelliJ IDEA fails with FileNotFoundException: Source './src/test/resources/tpchmulti' does not exist

Vladimir Sitnikov created DRILL-7025:
----------------------------------------

             Summary: Running Drill unit tests from within IntelliJ IDEA fails with FileNotFoundException: Source './src/test/resources/tpchmulti' does not exist
                 Key: DRILL-7025
                 URL: https://issues.apache.org/jira/browse/DRILL-7025
             Project: Apache Drill
          Issue Type: Bug
          Components:  Server, Tools, Build &amp; Test
    Affects Versions: 1.15.0
            Reporter: Vladimir Sitnikov


I start org.apache.drill.TestExampleQueries via regular "run tests" button, and it produces the following exception:
{noformat}
java.lang.RuntimeException: This should not happen

at org.apache.drill.test.BaseDirTestWatcher.copyTo(BaseDirTestWatcher.java:298)
at org.apache.drill.test.BaseDirTestWatcher.copyResourceToRoot(BaseDirTestWatcher.java:223)
at org.apache.drill.TestExampleQueries.setupTestFiles(TestExampleQueries.java:42)
Caused by: java.io.FileNotFoundException: Source './src/test/resources/tpchmulti' does not exist
at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1074)
at org.apache.commons.io.FileUtils.copyFile(FileUtils.java:1038)
at org.apache.drill.test.BaseDirTestWatcher.copyTo(BaseDirTestWatcher.java:296)
... 2 more{noformat}
In fact IDEA creates "run configuration" that uses "/Users/vladimirsitnikov/Documents/work/drill" as "Working directory".

That directory is a root where all drill sources are located (i.e. I have /Users/vladimirsitnikov/Documents/work/drill/exec, /Users/vladimirsitnikov/Documents/work/drill/exec/java-exec and so on).

It looks like java-exec tests assume working directory is set to /Users/vladimirsitnikov/Documents/work/drill/exec/java-exec, however it is not the case when individual tests are run.

The workaround is to add "exec/java-exec" to "working directory".

It would be so much better if tests could be run from both working directories.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)