Matt Sicker created LOG4J2-602:
----------------------------------

             Summary: Several unit tests are too spammy in the build log
                 Key: LOG4J2-602
                 URL: https://issues.apache.org/jira/browse/LOG4J2-602
             Project: Log4j 2
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0-rc1
            Reporter: Matt Sicker


When I build the project using {{maven 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|https://travis-ci.org/jvz/logging-log4j2/jobs/22911866]. 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?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to