Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-11

Tests are setting logger level and should not be.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.9.4
    • 1.1.0
    • Test
    • None

    Description

      I'm seeing the following on my system, at which point junit stops:

      [junit] Running com.cloudera.flume.agent.diskfailover.TestConcurrentDFOMan
      [junit] Tests run: 11, Failures: 5, Errors: 0, Time elapsed: 161.737 sec
      [junit] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      [junit] at java.util.Arrays.copyOf(Arrays.java:2786)
      [junit] at java.lang.StringCoding.safeTrim(StringCoding.java:64)
      [junit] at java.lang.StringCoding.access$300(StringCoding.java:34)
      [junit] at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:251)
      [junit] at java.lang.StringCoding.encode(StringCoding.java:272)
      [junit] at java.lang.StringCoding.encode(StringCoding.java:284)
      [junit] at java.lang.String.getBytes(String.java:986)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter.endTestSuite(PlainJUnitResultFormatter.java:152)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.fireEndTestSuite(JUnitTestRunner.java:619)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:452)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768)

      Notice that it's junit that's running out of memory - it's unable to handle the huge amount of dfo test logs that are being output at debug level due to this in the test:

      @Before
      public void setDebug()

      { Logger.getRootLogger().setLevel(Level.DEBUG); }

      The test should not set the debugging level, rather this should be set in the log4j.properties file. Such code should be removed from all tests.

      Attachments

        Issue Links

          Activity

            People

              alo.alt Alexander Alten-Lorenz
              phunt Patrick D. Hunt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: