You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Paul Rogers (JIRA)" <ji...@apache.org> on 2016/12/07 05:08:58 UTC

[jira] [Updated] (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:all-tabpanel ]

Paul Rogers updated DRILL-5112:
-------------------------------
    Description: 
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.

  was:
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.


> 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)