From 79a28f820f00a035020dbe651e1cc8b4f1c72ace Mon Sep 17 00:00:00 2001 From: Jerry Duffy Date: Mon, 30 Dec 2024 10:03:30 -0500 Subject: [PATCH] Correct const name in test --- .../log4j2/layout/template/json/AgentUtilsTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/apache-log4j-layout-template-json-2.14.0/src/test/java/com/nr/agent/instrumentation/log4j2/layout/template/json/AgentUtilsTest.java b/instrumentation/apache-log4j-layout-template-json-2.14.0/src/test/java/com/nr/agent/instrumentation/log4j2/layout/template/json/AgentUtilsTest.java index cbffa71d2e..e622b73f10 100644 --- a/instrumentation/apache-log4j-layout-template-json-2.14.0/src/test/java/com/nr/agent/instrumentation/log4j2/layout/template/json/AgentUtilsTest.java +++ b/instrumentation/apache-log4j-layout-template-json-2.14.0/src/test/java/com/nr/agent/instrumentation/log4j2/layout/template/json/AgentUtilsTest.java @@ -22,7 +22,7 @@ public class AgentUtilsTest { private static final String LOG_JSON_WITH_MESSAGE_FIELD_ESCAPED_QUOTE_COMMA = "{\"instant\" : {\"epochSecond\" : 1734983121,\"nanoOfSecond\" : 537701000},\"level\" : \"INFO\",\"loggerName\" : \"org.hibernate.validator.internal.util.Version\",\"message\" : \"info \\\"bar\\\",\",\"endOfBatch\" : true,\"loggerFqcn\" : \"org.hibernate.validator.internal.util.logging.Log_$logger\"}\n"; - private static final String LOG_JSON_WITH_MESSAGE_LAST_FIELD_ESCAPED_QUOTE_COMMA = "{\"instant\": {\"epochSecond\": 1734983121,\"nanoOfSecond\": 537701000},\"level\": \"INFO\",\"loggerName\": \"org.hibernate.validator.internal.util.Version\",\"endOfBatch\": true,\"loggerFqcn\": \"org.hibernate.validator.internal.util.logging.Log_$logger\",\"message\": \"info \\\"bar\\\",\"}"; + private static final String LOG_JSON_WITH_MESSAGE_LAST_FIELD_ESCAPED_QUOTE_BRACE = "{\"instant\": {\"epochSecond\": 1734983121,\"nanoOfSecond\": 537701000},\"level\": \"INFO\",\"loggerName\": \"org.hibernate.validator.internal.util.Version\",\"endOfBatch\": true,\"loggerFqcn\": \"org.hibernate.validator.internal.util.logging.Log_$logger\",\"message\": \"info \\\"bar\\\",\"}"; private static final String LOG_JSON_WITH_MESSAGE_FIELD = "{\"instant\" : {\"epochSecond\" : 1734983121,\"nanoOfSecond\" : 537701000},\"level\" : \"INFO\",\"loggerName\" : \"org.hibernate.validator.internal.util.Version\",\"message\" : \"normal msg text\",\"endOfBatch\" : true,\"loggerFqcn\" : \"org.hibernate.validator.internal.util.logging.Log_$logger\"}\n"; private static final String LOG_JSON_NO_MESSAGE_FIELD = "{\"instant\": {\"epochSecond\": 1734983121,\"nanoOfSecond\": 537701000},\"level\": \"INFO\",\"loggerName\": \"org.hibernate.validator.internal.util.Version\",\"endOfBatch\": true,\"loggerFqcn\": \"org.hibernate.validator.internal.util.logging.Log_$logger\",\"foobar\": \"info \\\"bar\\\",\"}"; @@ -49,7 +49,7 @@ public void after() { @Test public void getIndexToModifyJson_withMessageField_findsProperIndex() { assertEquals(175, AgentUtils.getIndexToModifyJson(LOG_JSON_WITH_MESSAGE_FIELD_ESCAPED_QUOTE_COMMA)); - assertEquals(262, AgentUtils.getIndexToModifyJson(LOG_JSON_WITH_MESSAGE_LAST_FIELD_ESCAPED_QUOTE_COMMA)); + assertEquals(262, AgentUtils.getIndexToModifyJson(LOG_JSON_WITH_MESSAGE_LAST_FIELD_ESCAPED_QUOTE_BRACE)); } @Test