Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Failure - MDC Looks Like #24

Open
coderlol opened this issue Aug 21, 2015 · 2 comments
Open

Test Failure - MDC Looks Like #24

coderlol opened this issue Aug 21, 2015 · 2 comments

Comments

@coderlol
Copy link

Gradle suite > Gradle test > org.apache.logging.log4j.core.layout.LogStashJSONLayoutJacksonIT.BasicSimpleTest STANDARD_OUT
[cut due to security, but I have 6 pair of key-values here for some reason...seemingly derived from my env]

Gradle suite > Gradle test > org.apache.logging.log4j.core.layout.LogStashJSONLayoutJacksonIT.BasicSimpleTest FAILED
java.lang.AssertionError:
Expected: "{"@Version":"1","thread":"Test worker","level":"DEBUG","loggerName":"org.apache.logging.log4j.core.layout.LogStashJSONLayoutJacksonIT","message":"Test Message","endOfBatch":false,"loggerFqcn":"org.apache.logging.log4j.core.layout.LogStashJSONLayoutJacksonIT","contextMap":[{"key":"Foo","value":"Bar"},{"key":"A","value":"B"}]}"
but: contextMap[]: Expected 2 values but got 6
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
at org.apache.logging.log4j.core.layout.LogStashJSONLayoutJacksonIT.BasicSimpleTest(LogStashJSONLayoutJacksonIT.java:99)

@coderlol
Copy link
Author

Looks like the test just needs to be updated.

@StephenGoodall
Copy link

The extra values seem to come from the log4j2.xml that is in the test folder, I changed the expected value to match it and the test passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants