Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove yang-test
[controller.git]
/
opendaylight
/
config
/
config-manager
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
config
/
manager
/
testingservices
/
parallelapsp
/
test
/
MockedDependenciesTest.java
diff --git
a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/MockedDependenciesTest.java
b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/MockedDependenciesTest.java
index 29e91fd924b5739af4b155e7e84b90a0c043a336..1e0bebbf06b512508aefdbd86e37081a07c88248 100644
(file)
--- a/
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/MockedDependenciesTest.java
+++ b/
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/MockedDependenciesTest.java
@@
-10,9
+10,7
@@
package org.opendaylight.controller.config.manager.testingservices.parallelapsp.
import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.Executor;
import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.Executor;
-
import javax.management.ObjectName;
import javax.management.ObjectName;
-
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
@@
-36,14
+34,14
@@
public class MockedDependenciesTest extends AbstractParallelAPSPTest {
ClassBasedModuleFactory mockedThreadPoolConfigFactory = new ClassBasedModuleFactory(
threadPoolImplementationName, MockedThreadPoolModule.class);
ClassBasedModuleFactory mockedThreadPoolConfigFactory = new ClassBasedModuleFactory(
threadPoolImplementationName, MockedThreadPoolModule.class);
- super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(
+ super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(
mockedContext,
new TestingParallelAPSPModuleFactory(),
mockedThreadPoolConfigFactory));
}
new TestingParallelAPSPModuleFactory(),
mockedThreadPoolConfigFactory));
}
- public
static
interface MockedTestingThreadPoolConfigMXBean extends
+ public interface MockedTestingThreadPoolConfigMXBean extends
TestingThreadPoolConfigMXBean {
TestingThreadPoolConfigMXBean {
-
public
void setThreadCount(int threadCount);
+ void setThreadCount(int threadCount);
}
public static class MockedThreadPoolModule implements Module,
}
public static class MockedThreadPoolModule implements Module,
@@
-55,23
+53,18
@@
public class MockedDependenciesTest extends AbstractParallelAPSPTest {
int threadCount;
public MockedThreadPoolModule(
int threadCount;
public MockedThreadPoolModule(
-
DynamicMBeanWithInstance dynamicMBeanWithInstance,
ModuleIdentifier moduleIdentifier) {
+
final DynamicMBeanWithInstance dynamicMBeanWithInstance, final
ModuleIdentifier moduleIdentifier) {
// no reconfiguration / reuse is supported
this.moduleIdentifier = moduleIdentifier;
}
// no reconfiguration / reuse is supported
this.moduleIdentifier = moduleIdentifier;
}
- @Override
- public ModuleIdentifier getName() {
- return moduleIdentifier;
- }
-
@Override
public int getThreadCount() {
return threadCount;
}
@Override
@Override
public int getThreadCount() {
return threadCount;
}
@Override
- public void setThreadCount(int threadCount) {
+ public void setThreadCount(
final
int threadCount) {
this.threadCount = threadCount;
}
this.threadCount = threadCount;
}
@@
-80,17
+73,27
@@
public class MockedDependenciesTest extends AbstractParallelAPSPTest {
}
}
+ @Override
+ public boolean canReuse(final Module oldModule) {
+ return false;
+ }
+
@Override
public Closeable getInstance() {
return new MockedThreadPool(threadCount);
}
@Override
public Closeable getInstance() {
return new MockedThreadPool(threadCount);
}
+
+ @Override
+ public ModuleIdentifier getIdentifier() {
+ return moduleIdentifier;
+ }
}
public static class MockedThreadPool implements TestingThreadPoolIfc,
Closeable {
private final int threadCount;
}
public static class MockedThreadPool implements TestingThreadPoolIfc,
Closeable {
private final int threadCount;
- public MockedThreadPool(int threadCount) {
+ public MockedThreadPool(
final
int threadCount) {
this.threadCount = threadCount;
}
this.threadCount = threadCount;
}
@@
-111,7
+114,7
@@
public class MockedDependenciesTest extends AbstractParallelAPSPTest {
}
@Override
}
@Override
- String getThreadPoolImplementationName() {
+
protected
String getThreadPoolImplementationName() {
return threadPoolImplementationName;
}
return threadPoolImplementationName;
}