提交 3f6adaef 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Merge pull request #530 from ascrutae/feature/plugin-feature

fix tavis-ci build failed issue
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册