From b53a149e77033bf4d6a417700f51dbb54e9f09fc Mon Sep 17 00:00:00 2001 From: King John Date: Fri, 26 Jul 2024 16:22:03 +0800 Subject: [PATCH] [#11290] logback-it, update TraceId value check --- .../com/navercorp/pinpoint/it/plugin/logback/LogbackIT.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agent-module/plugins-it/logback-it/src/test/java/com/navercorp/pinpoint/it/plugin/logback/LogbackIT.java b/agent-module/plugins-it/logback-it/src/test/java/com/navercorp/pinpoint/it/plugin/logback/LogbackIT.java index 36a0350ea65c..b406ee71acd8 100644 --- a/agent-module/plugins-it/logback-it/src/test/java/com/navercorp/pinpoint/it/plugin/logback/LogbackIT.java +++ b/agent-module/plugins-it/logback-it/src/test/java/com/navercorp/pinpoint/it/plugin/logback/LogbackIT.java @@ -48,7 +48,9 @@ public void test() { checkVersion(logger); - Assertions.assertNotNull(MDC.get("PtxId"), "txId"); + String ptxId = MDC.get("PtxId"); + Assertions.assertNotNull(ptxId, "TxId"); + Assertions.assertTrue(ptxId.contains("build.test.0^1"), "TxId value"); Assertions.assertNotNull(MDC.get("PspanId"), "spanId"); Assertions.assertNotNull(MDC.get("PreqId"), "reqId"); } @@ -73,6 +75,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"), "TxId value"); Assertions.assertNotNull(logger, "logger null"); checkVersion(logger);