diff --git a/eventmesh-common/src/test/java/org/apache/eventmesh/common/ThreadWrapperTest.java b/eventmesh-common/src/test/java/org/apache/eventmesh/common/ThreadWrapperTest.java index 6315911eb8..8a0feee22a 100644 --- a/eventmesh-common/src/test/java/org/apache/eventmesh/common/ThreadWrapperTest.java +++ b/eventmesh-common/src/test/java/org/apache/eventmesh/common/ThreadWrapperTest.java @@ -24,6 +24,9 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Timeout; +import lombok.extern.slf4j.Slf4j; + +@Slf4j public class ThreadWrapperTest { @Test @@ -74,7 +77,7 @@ public void run() { try { TimeUnit.MILLISECONDS.sleep(500); } catch (InterruptedException e) { - e.printStackTrace(); + log.error("[ThreadWrapper][shutdown] InterruptedException", e); } counter.set(100); } @@ -136,4 +139,4 @@ public void run() { wrapper.setDaemon(daemon); return wrapper; } -} \ No newline at end of file +} diff --git a/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/SourceWorker.java b/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/SourceWorker.java index bf9878e486..26c46f7c47 100644 --- a/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/SourceWorker.java +++ b/eventmesh-openconnect/eventmesh-openconnect-java/src/main/java/org/apache/eventmesh/openconnect/SourceWorker.java @@ -276,7 +276,6 @@ public void stop() { try { source.stop(); } catch (Exception e) { - e.printStackTrace(); log.error("source destroy error", e); } log.info("pollService stopping"); diff --git a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/PubClientImpl.java b/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/PubClientImpl.java index 734ad6fc54..a088afc8f0 100644 --- a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/PubClientImpl.java +++ b/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/PubClientImpl.java @@ -73,7 +73,7 @@ public void close() { task.cancel(false); super.close(); } catch (Exception e) { - e.printStackTrace(); + log.error("PubClientImpl|{}|close|failed", clientNo, e); } }