diff --git a/agent-module/plugins-it/log4j-it/src/test/java/com/navercorp/pinpoint/it/plugin/log4j/Log4jTestBase.java b/agent-module/plugins-it/log4j-it/src/test/java/com/navercorp/pinpoint/it/plugin/log4j/Log4jTestBase.java index ece857b3a0e0..efef3b2957f5 100644 --- a/agent-module/plugins-it/log4j-it/src/test/java/com/navercorp/pinpoint/it/plugin/log4j/Log4jTestBase.java +++ b/agent-module/plugins-it/log4j-it/src/test/java/com/navercorp/pinpoint/it/plugin/log4j/Log4jTestBase.java @@ -29,8 +29,11 @@ protected void checkMDC() { logger.error("maru"); checkVersion(logger); - - Assertions.assertNotNull(MDC.get("PtxId"), "txId"); + Object ptxId = MDC.get("PtxId"); + Assertions.assertNotNull(ptxId, "TxId"); + Assertions.assertInstanceOf(String.class, ptxId, "TxId type"); + String id = (String) ptxId; + Assertions.assertTrue(id.contains("build.test.0^1"), "TxId value"); Assertions.assertNotNull(MDC.get("PspanId"), "spanId"); } @@ -51,6 +54,7 @@ public void run() { Assertions.assertNotNull(log, "log null"); Assertions.assertTrue(log.contains(msg), "contains msg"); Assertions.assertTrue(log.contains("TxId"), "contains TxId"); + Assertions.assertTrue(log.contains("build.test.0^1"), "contains TxId value"); Assertions.assertNotNull(logger, "logger null"); checkVersion(logger);