[jira] [Commented] (DRILL-5112) Unit tests derived from PopUnitTestBase fail in IDE due to config errors
[ https://issues.apache.org/jira/browse/DRILL-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15946108#comment-15946108 ] Kunal Khatua commented on DRILL-5112: - Closing as no QA verification is required > Unit tests derived from PopUnitTestBase fail in IDE due to config errors > > > Key: DRILL-5112 > URL: https://issues.apache.org/jira/browse/DRILL-5112 > Project: Apache Drill > Issue Type: Bug >Affects Versions: 1.8.0 >Reporter: Paul Rogers >Assignee: Paul Rogers > Labels: ready-to-commit > Fix For: 1.10.0 > > > Drill provides a wide variety of unit tests. Many derive from > {{PopUnitTestBase}} to test the Physical OPerators. > The tests use a default configuration: > {code} > protected static DrillConfig CONFIG; > @BeforeClass > public static void setup() { > CONFIG = DrillConfig.create(); > } > {code} > The tests rely on config settings specified in the {{pom.xml}} file (see note > below.) When run in Eclipse, no such config exists, so the tests use only the > default config. The defaults allow a web server to be started. > Many tests start multiple Drillbits using the above config. When this occurs, > each tries to start a web server. The second one fails because the HTTP port > is already in use. > The solution is to initialize the config using the same settings as used in > the {{BaseTestQuery}} test case: the unit tests then work fine in Eclipse. > As an aside, having multiple ways to set up the Drill config (and other > items) leads to much wasted time as each engineer must learn the quirks of > each test hierarchy. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (DRILL-5112) Unit tests derived from PopUnitTestBase fail in IDE due to config errors
[ https://issues.apache.org/jira/browse/DRILL-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15945681#comment-15945681 ] Paul Rogers commented on DRILL-5112: This is a development issue that needs no QA verification. > Unit tests derived from PopUnitTestBase fail in IDE due to config errors > > > Key: DRILL-5112 > URL: https://issues.apache.org/jira/browse/DRILL-5112 > Project: Apache Drill > Issue Type: Bug >Affects Versions: 1.8.0 >Reporter: Paul Rogers >Assignee: Paul Rogers > Labels: ready-to-commit > Fix For: 1.10.0 > > > Drill provides a wide variety of unit tests. Many derive from > {{PopUnitTestBase}} to test the Physical OPerators. > The tests use a default configuration: > {code} > protected static DrillConfig CONFIG; > @BeforeClass > public static void setup() { > CONFIG = DrillConfig.create(); > } > {code} > The tests rely on config settings specified in the {{pom.xml}} file (see note > below.) When run in Eclipse, no such config exists, so the tests use only the > default config. The defaults allow a web server to be started. > Many tests start multiple Drillbits using the above config. When this occurs, > each tries to start a web server. The second one fails because the HTTP port > is already in use. > The solution is to initialize the config using the same settings as used in > the {{BaseTestQuery}} test case: the unit tests then work fine in Eclipse. > As an aside, having multiple ways to set up the Drill config (and other > items) leads to much wasted time as each engineer must learn the quirks of > each test hierarchy. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (DRILL-5112) Unit tests derived from PopUnitTestBase fail in IDE due to config errors
[ https://issues.apache.org/jira/browse/DRILL-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15743666#comment-15743666 ] ASF GitHub Bot commented on DRILL-5112: --- Github user asfgit closed the pull request at: https://github.com/apache/drill/pull/681 > Unit tests derived from PopUnitTestBase fail in IDE due to config errors > > > Key: DRILL-5112 > URL: https://issues.apache.org/jira/browse/DRILL-5112 > Project: Apache Drill > Issue Type: Bug >Affects Versions: 1.8.0 >Reporter: Paul Rogers >Assignee: Paul Rogers > Labels: ready-to-commit > > Drill provides a wide variety of unit tests. Many derive from > {{PopUnitTestBase}} to test the Physical OPerators. > The tests use a default configuration: > {code} > protected static DrillConfig CONFIG; > @BeforeClass > public static void setup() { > CONFIG = DrillConfig.create(); > } > {code} > The tests rely on config settings specified in the {{pom.xml}} file (see note > below.) When run in Eclipse, no such config exists, so the tests use only the > default config. The defaults allow a web server to be started. > Many tests start multiple Drillbits using the above config. When this occurs, > each tries to start a web server. The second one fails because the HTTP port > is already in use. > The solution is to initialize the config using the same settings as used in > the {{BaseTestQuery}} test case: the unit tests then work fine in Eclipse. > As an aside, having multiple ways to set up the Drill config (and other > items) leads to much wasted time as each engineer must learn the quirks of > each test hierarchy. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-5112) Unit tests derived from PopUnitTestBase fail in IDE due to config errors
[ https://issues.apache.org/jira/browse/DRILL-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15736784#comment-15736784 ] ASF GitHub Bot commented on DRILL-5112: --- Github user sudheeshkatkam commented on the issue: https://github.com/apache/drill/pull/681 +1 > Unit tests derived from PopUnitTestBase fail in IDE due to config errors > > > Key: DRILL-5112 > URL: https://issues.apache.org/jira/browse/DRILL-5112 > Project: Apache Drill > Issue Type: Bug >Affects Versions: 1.8.0 >Reporter: Paul Rogers >Assignee: Paul Rogers > Labels: ready-to-commit > > Drill provides a wide variety of unit tests. Many derive from > {{PopUnitTestBase}} to test the Physical OPerators. > The tests use a default configuration: > {code} > protected static DrillConfig CONFIG; > @BeforeClass > public static void setup() { > CONFIG = DrillConfig.create(); > } > {code} > The tests rely on config settings specified in the {{pom.xml}} file (see note > below.) When run in Eclipse, no such config exists, so the tests use only the > default config. The defaults allow a web server to be started. > Many tests start multiple Drillbits using the above config. When this occurs, > each tries to start a web server. The second one fails because the HTTP port > is already in use. > The solution is to initialize the config using the same settings as used in > the {{BaseTestQuery}} test case: the unit tests then work fine in Eclipse. > As an aside, having multiple ways to set up the Drill config (and other > items) leads to much wasted time as each engineer must learn the quirks of > each test hierarchy. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-5112) Unit tests derived from PopUnitTestBase fail in IDE due to config errors
[ https://issues.apache.org/jira/browse/DRILL-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15727945#comment-15727945 ] ASF GitHub Bot commented on DRILL-5112: --- Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/681#discussion_r91236287 --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/pop/PopUnitTestBase.java --- @@ -42,7 +46,17 @@ @BeforeClass public static void setup() { -CONFIG = DrillConfig.create(); +Properties props = new Properties(); --- End diff -- Per the TypeSafe config system, command line properties override any properties here or in drill-module.conf. > Unit tests derived from PopUnitTestBase fail in IDE due to config errors > > > Key: DRILL-5112 > URL: https://issues.apache.org/jira/browse/DRILL-5112 > Project: Apache Drill > Issue Type: Bug >Affects Versions: 1.8.0 >Reporter: Paul Rogers >Assignee: Paul Rogers > > Drill provides a wide variety of unit tests. Many derive from > {{PopUnitTestBase}} to test the Physical OPerators. > The tests use a default configuration: > {code} > protected static DrillConfig CONFIG; > @BeforeClass > public static void setup() { > CONFIG = DrillConfig.create(); > } > {code} > The tests rely on config settings specified in the {{pom.xml}} file (see note > below.) When run in Eclipse, no such config exists, so the tests use only the > default config. The defaults allow a web server to be started. > Many tests start multiple Drillbits using the above config. When this occurs, > each tries to start a web server. The second one fails because the HTTP port > is already in use. > The solution is to initialize the config using the same settings as used in > the {{BaseTestQuery}} test case: the unit tests then work fine in Eclipse. > As an aside, having multiple ways to set up the Drill config (and other > items) leads to much wasted time as each engineer must learn the quirks of > each test hierarchy. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-5112) Unit tests derived from PopUnitTestBase fail in IDE due to config errors
[ https://issues.apache.org/jira/browse/DRILL-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15727760#comment-15727760 ] ASF GitHub Bot commented on DRILL-5112: --- GitHub user paul-rogers opened a pull request: https://github.com/apache/drill/pull/681 DRILL-5112: Unit tests derived from PopUnitTestBase fail in IDE due to config errors Tests rely on command-line settings in the pom.xml file. Those settings are not available when tests are run in Eclipse. Replicated required settings into the base test class (as in BaseTestQuery). You can merge this pull request into a Git repository by running: $ git pull https://github.com/paul-rogers/drill DRILL-5112 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/681.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 #681 commit ddccb6a6ad16e49175bb90468a7845d9fae8eaac Author: Paul Rogers Date: 2016-12-07T05:11:56Z DRILL-5112: Unit tests derived from PopUnitTestBase fail in IDE due to config errors Tests rely on command-line settings in the pom.xml file. Those settings are not available when tests are run in Eclipse. Replicated required settings into the base test class (as in BaseTestQuery). > Unit tests derived from PopUnitTestBase fail in IDE due to config errors > > > Key: DRILL-5112 > URL: https://issues.apache.org/jira/browse/DRILL-5112 > Project: Apache Drill > Issue Type: Bug >Affects Versions: 1.8.0 >Reporter: Paul Rogers >Assignee: Paul Rogers > > Drill provides a wide variety of unit tests. Many derive from > {{PopUnitTestBase}} to test the Physical OPerators. > The tests use a default configuration: > {code} > protected static DrillConfig CONFIG; > @BeforeClass > public static void setup() { > CONFIG = DrillConfig.create(); > } > {code} > The tests rely on config settings specified in the {{pom.xml}} file (see note > below.) When run in Eclipse, no such config exists, so the tests use only the > default config. The defaults allow a web server to be started. > Many tests start multiple Drillbits using the above config. When this occurs, > each tries to start a web server. The second one fails because the HTTP port > is already in use. > The solution is to initialize the config using the same settings as used in > the {{BaseTestQuery}} test case: the unit tests then work fine in Eclipse. > As an aside, having multiple ways to set up the Drill config (and other > items) leads to much wasted time as each engineer must learn the quirks of > each test hierarchy. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DRILL-5112) Unit tests derived from PopUnitTestBase fail in IDE due to config errors
[ https://issues.apache.org/jira/browse/DRILL-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15727611#comment-15727611 ] Paul Rogers commented on DRILL-5112: When run in an IDE, tests do not run with the Maven Surefire settings spelled out in {{drill-root/pom.xml}}: {code} maven-surefire-plugin 2.17 -Xms512m -Xmx3g -Ddrill.exec.http.enabled=false -Ddrill.exec.sys.store.provider.local.write=false -Dorg.apache.drill.exec.server.Drillbit.system_options="org.apache.drill.exec.compile.ClassTransformer.scalar_replacement=on" -Ddrill.test.query.printing.silent=true -Ddrill.catastrophic_to_standard_out=true {code} As a result, many tests will fail, or do strange things, when run in an IDE. The workaround is to copy all the config settings to each launch profile in Eclipse. The proposed solution is to migrate, for the tests described in this bug, to set the properties in the test code (base class) as is already done in tests deriving from {{BaseTestQuery}}. Note that even doing so, the properties can be easily override via Maven in the future since, under the TypeSafe config system, properties on the command line override those set internally. > Unit tests derived from PopUnitTestBase fail in IDE due to config errors > > > Key: DRILL-5112 > URL: https://issues.apache.org/jira/browse/DRILL-5112 > Project: Apache Drill > Issue Type: Bug >Affects Versions: 1.8.0 >Reporter: Paul Rogers >Assignee: Paul Rogers > > Drill provides a wide variety of unit tests. Many derive from > {{PopUnitTestBase}} to test the Physical OPerators. > The tests use a default configuration: > {code} > protected static DrillConfig CONFIG; > @BeforeClass > public static void setup() { > CONFIG = DrillConfig.create(); > } > {code} > The default config tries to locate a {{drill-override.conf}} file somewhere > on the class path. > When run in Eclipse, no such file exists. Instead, no override file is found > and defaults are used. The defaults allow a web server to be started. > Many tests start multiple Drillbits using the above config. When this occurs, > each tries to start a web server. The second one fails because the HTTP port > is already in use. > It is not clear how these tests succeed when run from Maven. Perhaps in that > scenario the required file is somehow placed onto the class path? No such > file exists in the source path. > The solution is to initialize the config using the same settings as used in > the {{BaseTestQuery}} test case: the unit tests then work fine in Eclipse. > As an aside, having multiple ways to set up the Drill config (and other > items) leads to much wasted time as each engineer must learn the quirks of > each test hierarchy. -- This message was sent by Atlassian JIRA (v6.3.4#6332)