diff --git a/tracer-core/src/test/java/com/alipay/common/tracer/core/tracertest/SofaTracerTest.java b/tracer-core/src/test/java/com/alipay/common/tracer/core/tracertest/SofaTracerTest.java index 1c13eb66..62c239e6 100644 --- a/tracer-core/src/test/java/com/alipay/common/tracer/core/tracertest/SofaTracerTest.java +++ b/tracer-core/src/test/java/com/alipay/common/tracer/core/tracertest/SofaTracerTest.java @@ -41,6 +41,8 @@ import java.io.File; import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -141,6 +143,11 @@ public void testReportSpan() { .getDefaultLogName()); String absolutePath = file.getAbsolutePath(); System.out.println("path is ????"+absolutePath); + if (Files.exists(Paths.get(absolutePath))) { + System.out.println("文件存在"); + } else { + System.out.println("文件不存在"); + } List contents = FileUtils.readLines(customFileLog(TracerTestLogEnum.RPC_CLIENT .getDefaultLogName())); assertEquals(contents.get(0), 1, contents.size());