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 Jul 26, 2024
1 parent d1bcc6a commit 456a2ad
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");
}

Expand All @@ -72,6 +74,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 456a2ad

Please sign in to comment.