[
https://issues.apache.org/jira/browse/FLUME-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Lorenz-Alten resolved FLUME-11.
-----------------------------------------
Resolution: Fixed
Fix Version/s: v1.1.0
Assignee: Alexander Lorenz-Alten
> Tests are setting logger level and should not be.
> -------------------------------------------------
>
> Key: FLUME-11
> URL: https://issues.apache.org/jira/browse/FLUME-11
> Project: Flume
> Issue Type: Bug
> Components: Test
> Affects Versions: v0.9.4
> Reporter: Patrick Hunt
> Assignee: Alexander Lorenz-Alten
> Priority: Minor
> Fix For: v1.1.0
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira