diff --git a/oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/MockModuleManager.java b/oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/MockModuleManager.java index 7a7acbdee205..854ad89e9558 100644 --- a/oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/MockModuleManager.java +++ b/oap-server/server-core/src/test/java/org/apache/skywalking/oap/server/core/MockModuleManager.java @@ -28,6 +28,7 @@ public abstract class MockModuleManager extends ModuleManager { private final Map moduleProviderHolderMap = Maps.newHashMap(); public MockModuleManager() { + super("Mock"); init(); } diff --git a/oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleDefine.java b/oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleDefine.java index 2f3937468d12..a26ce2912cdd 100644 --- a/oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleDefine.java +++ b/oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleDefine.java @@ -23,7 +23,6 @@ import java.util.Enumeration; import java.util.Properties; import java.util.ServiceLoader; -import org.apache.logging.log4j.core.util.Loader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/oap-server/server-library/library-module/src/test/java/org/apache/skywalking/oap/server/library/module/ModuleManagerTest.java b/oap-server/server-library/library-module/src/test/java/org/apache/skywalking/oap/server/library/module/ModuleManagerTest.java index 683ba7ceaf55..2271de3a7461 100644 --- a/oap-server/server-library/library-module/src/test/java/org/apache/skywalking/oap/server/library/module/ModuleManagerTest.java +++ b/oap-server/server-library/library-module/src/test/java/org/apache/skywalking/oap/server/library/module/ModuleManagerTest.java @@ -33,7 +33,7 @@ public void testInit() throws ServiceNotProvidedException, ModuleNotFoundExcepti configuration.addModule("BaseA").addProviderConfiguration("P-A", new Properties()); configuration.addModule("BaseB").addProviderConfiguration("P-B", new Properties()); - ModuleManager manager = new ModuleManager(); + ModuleManager manager = new ModuleManager("Test"); manager.init(configuration); BaseModuleA.ServiceABusiness1 serviceABusiness1 = manager.find("BaseA") @@ -52,7 +52,7 @@ public void testModuleConfigInit() throws ModuleConfigException, ModuleNotFoundE settings.put("attr4", true); configuration.addModule("BaseA").addProviderConfiguration("P-A", settings); - ModuleManager manager = new ModuleManager(); + ModuleManager manager = new ModuleManager("Test"); manager.init(configuration); final ModuleServiceHolder provider = manager.find("BaseA").provider(); @@ -72,7 +72,7 @@ public void testModuleMissing() { configuration.addModule("BaseA").addProviderConfiguration("P-A", new Properties()); configuration.addModule("BaseB").addProviderConfiguration("P-B2", new Properties()); - ModuleManager manager = new ModuleManager(); + ModuleManager manager = new ModuleManager("Test"); manager.init(configuration); }); } @@ -84,7 +84,7 @@ public void testCycleDependency() { configuration.addModule("BaseA").addProviderConfiguration("P-A2", new Properties()); configuration.addModule("BaseB").addProviderConfiguration("P-B3", new Properties()); - ModuleManager manager = new ModuleManager(); + ModuleManager manager = new ModuleManager("Test"); manager.init(configuration); }); }