From dfd26035426b13382c32d602b48d8c73930c3197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E6=B5=B7?= Date: Thu, 30 May 2024 18:22:00 +0800 Subject: [PATCH] Fixed span clone concurrency issues --- .../common/tracer/core/tracertest/SofaTracerTest.java | 7 +++++++ 1 file changed, 7 insertions(+) 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());