Fix test cases.

This commit is contained in:
Wu Sheng 2019-03-14 20:58:00 +08:00
parent 930e73f1a1
commit 584cd540d4
1 changed files with 2 additions and 5 deletions

View File

@ -69,16 +69,13 @@ public class ServiceManagerTest {
private void assertIgnoreTracingContextListener() throws Exception {
List<TracingContextListener> listeners = getFieldValue(IgnoredTracerContext.ListenerManager.class, "LISTENERS");
assertThat(listeners.size(), is(1));
assertThat(listeners.contains(ServiceManager.INSTANCE.findService(ContextManager.class)), is(true));
assertThat(listeners.size(), is(0));
}
private void assertTracingContextListener() throws Exception {
List<TracingContextListener> listeners = getFieldValue(TracingContext.ListenerManager.class, "LISTENERS");
assertThat(listeners.size(), is(2));
assertThat(listeners.size(), is(1));
assertThat(listeners.contains(ServiceManager.INSTANCE.findService(ContextManager.class)), is(true));
assertThat(listeners.contains(ServiceManager.INSTANCE.findService(TraceSegmentServiceClient.class)), is(true));
}