Fix CI through clear context forcedly. (#231)

This commit is contained in:
吴晟 Wu Sheng 2022-06-23 18:59:47 +08:00 committed by GitHub
parent a1c64a4edc
commit f8deb7c30b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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();
}
}