Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-24588

Run tests using specific log4j2 configuration conveniently

    XMLWordPrintableJSON

Details

    Description

      In order to reproduce a problem (e.g., HIVE-24569) or validate that a log4j2 configuration is working as expected it is necessary to run a test and explicitly specify which configuration should be used. Moreover, after the end of the test in question it is desirable to restore the old logging configuration that was used before launching the test to avoid affecting the overall logging output.

      The goal of this issue is to introduce a convenient & declarative way of running tests with log4j2 configurations based on Jupiter extensions and annotations. The test could like below:

        @Test
        @Log4jConfig("test-log4j2.properties")
        void testUseExplicitConfig() {
          // Do something and assert
        }
      

      Attachments

        Issue Links

          Activity

            People

              zabetak Stamatis Zampetakis
              zabetak Stamatis Zampetakis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h