You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/06/23 09:23:53 UTC
[skywalking-java] 01/01: Fix CI through clear context forcedly.
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch ci-fix
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git
commit 5ff805efa150b3f685238224d66fdadcb0768401
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Jun 23 17:23:47 2022 +0800
Fix CI through clear context forcedly.
---
.../skywalking/apm/agent/core/test/tools/AgentServiceRule.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/test/tools/AgentServiceRule.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/test/tools/AgentServiceRule.java
index 29b5aff8b..80dfb187e 100644
--- a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/test/tools/AgentServiceRule.java
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/test/tools/AgentServiceRule.java
@@ -44,6 +44,12 @@ public class AgentServiceRule extends ExternalResource {
@Override
protected void before() throws Throwable {
super.before();
+
+ Whitebox.setInternalState(ServiceManager.INSTANCE, "bootedServices", new HashMap<Class, BootService>());
+ Whitebox.setInternalState(TracingContext.ListenerManager.class, "LISTENERS", new LinkedList<TracingContextListener>());
+ Whitebox.setInternalState(IgnoredTracerContext.ListenerManager.class, "LISTENERS", new LinkedList<TracingContextListener>());
+ Whitebox.setInternalState(TracingContext.TracingThreadListenerManager.class, "LISTENERS", new LinkedList<TracingThreadListener>());
+
ServiceManager.INSTANCE.boot();
}
}