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 10:59:53 UTC
[skywalking-java] branch main updated: Fix CI through clear context forcedly. (#231)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git
The following commit(s) were added to refs/heads/main by this push:
new f8deb7c30 Fix CI through clear context forcedly. (#231)
f8deb7c30 is described below
commit f8deb7c30b931aae83ac1f438ce72b3f74414ae5
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Thu Jun 23 18:59:47 2022 +0800
Fix CI through clear context forcedly. (#231)
---
.../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();
}
}