Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-602

Several unit tests are too spammy in the build log

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc1
    • Fix Version/s: None
    • Component/s: Core
    • Labels:


      When I build the project using mvn clean install, I get a ton of irrelevant information about various tests. There are a few tests that intentionally throw an exception (e.g., for testing the FailoverAppender) with messages like "always fail" or "test". Now as a human, I can tell that those tests work as expected. However, as a robot, I wouldn't be able to tell the difference between test exception stack traces and actual problems with the tests.

      In fact, some CI systems will consider such error output to be a build problem and won't mark the build as successful. See, for instance, my attempted build on travis-ci.org. These debug messages, while useful in development, really ought to be a build profile setting (however that would be done in Maven; or if there's a way to mix in the string lookup plugins with a maven property).

      I'm actually wondering if all the exception stack traces there are even expected. If they are, couldn't we use @Test(expected = SQLException.class) or whatever the syntax is?




            • Assignee:
              mattsicker Matt Sicker


              • Created:

                Issue deployment