Reconfigure test logging to show error messages#803
Closed
dennisvang wants to merge 4 commits intodevelopfrom
Closed
Reconfigure test logging to show error messages#803dennisvang wants to merge 4 commits intodevelopfrom
dennisvang wants to merge 4 commits intodevelopfrom
Conversation
and rename file so it is picked up automatically
Contributor
Author
|
Closing this because it is likely to be confusing. Actually it is not really necessary either, because often the information we are looking for is already displayed in the surefire output, but obscured by all the clutter. Just search the test output for the words |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current test logging config log4j2.xml does not produce any useful output at all during tests, except for the rudimentary output from the test framework itself. Normal log messages, like those we see when running the app, are suppressed:
FAIRDataPoint/src/test/resources/log4j2.xml
Line 11 in 97a23a0
This complicates "debugging" issues on the remote test runners. At the very least we should have some basic error logging.
For this reason:
log4j2.xmltolog4j2-test.xml, to be more explicit and conformant to log4j autoconfigerrorlevel logs during testsAlso added an explicit logger for data.repository to illustrate how to change levels for individual packages.
Note
One drawback is that tests which expect an exception to be raised, such as SecurityTest, will generate error messages in the test output. This could be confusing, because you see an error message but the test summary says
Failures: 0, Errors: 0. For example, we'll see output like this, which is actually correct:These messages can be suppressed by setting