fix tavis-ci build failed issue
This commit is contained in:
parent
4f9a958161
commit
29d76e0914
|
|
@ -22,5 +22,5 @@ package org.skywalking.apm.agent.core.logging.core;
|
|||
* Created by xin on 2016/12/7.
|
||||
*/
|
||||
public enum LogLevel {
|
||||
DEBUG, INFO, WARN, ERROR;
|
||||
DEBUG, INFO, WARN, ERROR, OFF
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,12 @@ import java.util.LinkedList;
|
|||
import org.junit.rules.ExternalResource;
|
||||
import org.skywalking.apm.agent.core.boot.BootService;
|
||||
import org.skywalking.apm.agent.core.boot.ServiceManager;
|
||||
import org.skywalking.apm.agent.core.conf.Config;
|
||||
import org.skywalking.apm.agent.core.conf.RemoteDownstreamConfig;
|
||||
import org.skywalking.apm.agent.core.context.IgnoredTracerContext;
|
||||
import org.skywalking.apm.agent.core.context.TracingContext;
|
||||
import org.skywalking.apm.agent.core.context.TracingContextListener;
|
||||
import org.skywalking.apm.agent.core.logging.core.LogLevel;
|
||||
import org.skywalking.apm.agent.test.helper.FieldSetter;
|
||||
|
||||
public class AgentServiceRule extends ExternalResource {
|
||||
|
|
@ -38,6 +40,7 @@ public class AgentServiceRule extends ExternalResource {
|
|||
FieldSetter.setValue(ServiceManager.INSTANCE.getClass(), "bootedServices", new HashMap<Class, BootService>());
|
||||
FieldSetter.setValue(IgnoredTracerContext.ListenerManager.class, "LISTENERS", new LinkedList<TracingContextListener>());
|
||||
FieldSetter.setValue(TracingContext.ListenerManager.class, "LISTENERS", new LinkedList<TracingContextListener>());
|
||||
ServiceManager.INSTANCE.shutdown();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
|
@ -45,6 +48,7 @@ public class AgentServiceRule extends ExternalResource {
|
|||
@Override
|
||||
protected void before() throws Throwable {
|
||||
super.before();
|
||||
Config.Logging.LEVEL = LogLevel.OFF;
|
||||
ServiceManager.INSTANCE.boot();
|
||||
RemoteDownstreamConfig.Agent.APPLICATION_ID = 1;
|
||||
RemoteDownstreamConfig.Agent.APPLICATION_INSTANCE_ID = 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue