Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5112

Unit tests derived from PopUnitTestBase fail in IDE due to config errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.0
    • 1.10.0
    • None

    Description

      Drill provides a wide variety of unit tests. Many derive from PopUnitTestBase to test the Physical OPerators.

      The tests use a default configuration:

      protected static DrillConfig CONFIG;
      
        @BeforeClass
        public static void setup() {
          CONFIG = DrillConfig.create();
        }
      

      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.

      Attachments

        Issue Links

          Activity

            People

              paul-rogers Paul Rogers
              paul-rogers Paul Rogers
              Chunhui Shi Chunhui Shi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: