Skip to content

Commit

Permalink
[pinpoint-apm#11290] logback-it, update TraceId value check
Browse files Browse the repository at this point in the history
  • Loading branch information
yjqg6666 committed Nov 4, 2024
1 parent 44bf69e commit 5c97547
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand All @@ -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);
Expand Down

0 comments on commit 5c97547

Please sign in to comment.