You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/12/21 01:26:06 UTC

[GitHub] [logging-log4j2] garydgregory commented on a change in pull request #646: LOG4J2-3264: Fix MapLookup to lookup MapMessage before DefaultMap

garydgregory commented on a change in pull request #646:
URL: https://github.com/apache/logging-log4j2/pull/646#discussion_r772766541



##########
File path: log4j-core/src/test/java/org/apache/logging/log4j/core/lookup/MapLookupTest.java
##########
@@ -107,7 +107,7 @@ public void testLookupDefaultMapIsCheckedBeforeMapMessage() {
                 .setMessage(message)
                 .build();
         final MapLookup lookup = new MapLookup(map);
-        assertEquals("ADefault", lookup.lookup(event, "A"));
+        assertEquals("AEvent", lookup.lookup(event, "A"));

Review comment:
       Hi @quaff 
   Thank you for your PR.
   I think you should test both a key that maps to a default and another that does not.
   You want to make sure the test covers all the paths in the lookup method. 
   TY!
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org