Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "BUG-944 Remove backwards compatibility config from sal-netconf- connector."
[controller.git]
/
opendaylight
/
netconf
/
netconf-it
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
netconf
/
it
/
NetconfConfigPersisterITTest.java
diff --git
a/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java
b/opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java
index af83fe46027ee6816855ab1a6e051139fea5603d..f7091beba5fcb09f26cb1248dbdfdd52d600db77 100644
(file)
--- a/
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java
+++ b/
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java
@@
-17,7
+17,6
@@
import static org.mockito.Mockito.mock;
import static org.opendaylight.controller.netconf.util.test.XmlUnitUtil.assertContainsElementWithName;
import static org.opendaylight.controller.netconf.util.test.XmlUnitUtil.assertElementsCount;
import static org.opendaylight.controller.netconf.util.xml.XmlUtil.readXmlToDocument;
import static org.opendaylight.controller.netconf.util.test.XmlUnitUtil.assertContainsElementWithName;
import static org.opendaylight.controller.netconf.util.test.XmlUnitUtil.assertElementsCount;
import static org.opendaylight.controller.netconf.util.xml.XmlUtil.readXmlToDocument;
-import io.netty.channel.ChannelFuture;
import java.io.IOException;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
@@
-43,6
+42,7
@@
import org.opendaylight.controller.netconf.api.NetconfMessage;
import org.opendaylight.controller.netconf.api.jmx.CommitJMXNotification;
import org.opendaylight.controller.netconf.api.monitoring.NetconfManagementSession;
import org.opendaylight.controller.netconf.client.NetconfClientDispatcher;
import org.opendaylight.controller.netconf.api.jmx.CommitJMXNotification;
import org.opendaylight.controller.netconf.api.monitoring.NetconfManagementSession;
import org.opendaylight.controller.netconf.client.NetconfClientDispatcher;
+import org.opendaylight.controller.netconf.client.NetconfClientDispatcherImpl;
import org.opendaylight.controller.netconf.client.test.TestingNetconfClient;
import org.opendaylight.controller.netconf.confignetconfconnector.osgi.NetconfOperationServiceFactoryImpl;
import org.opendaylight.controller.netconf.confignetconfconnector.osgi.YangStoreException;
import org.opendaylight.controller.netconf.client.test.TestingNetconfClient;
import org.opendaylight.controller.netconf.confignetconfconnector.osgi.NetconfOperationServiceFactoryImpl;
import org.opendaylight.controller.netconf.confignetconfconnector.osgi.YangStoreException;
@@
-65,16
+65,14
@@
import org.xml.sax.SAXException;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
+import io.netty.channel.ChannelFuture;
public class NetconfConfigPersisterITTest extends AbstractNetconfConfigTest {
private static final InetSocketAddress tcpAddress = new InetSocketAddress("127.0.0.1", 12023);
public class NetconfConfigPersisterITTest extends AbstractNetconfConfigTest {
private static final InetSocketAddress tcpAddress = new InetSocketAddress("127.0.0.1", 12023);
-
-
private NetconfClientDispatcher clientDispatcher;
private NetconfClientDispatcher clientDispatcher;
-
- DefaultCommitNotificationProducer commitNotifier;
+ private DefaultCommitNotificationProducer commitNotifier;
@Before
public void setUp() throws Exception {
@Before
public void setUp() throws Exception {
@@
-95,7
+93,7
@@
public class NetconfConfigPersisterITTest extends AbstractNetconfConfigTest {
ChannelFuture s = dispatch.createServer(tcpAddress);
s.await();
ChannelFuture s = dispatch.createServer(tcpAddress);
s.await();
- clientDispatcher = new NetconfClientDispatcher
(nettyThreadgroup, nettyThreadgroup, 5000
);
+ clientDispatcher = new NetconfClientDispatcher
Impl(getNettyThreadgroup(), getNettyThreadgroup(), getHashedWheelTimer()
);
}
@After
}
@After
@@
-124,12
+122,12
@@
public class NetconfConfigPersisterITTest extends AbstractNetconfConfigTest {
VerifyingNotificationListener notificationVerifier = createCommitNotificationListener();
VerifyingPersister mockedAggregator = mockAggregator();
VerifyingNotificationListener notificationVerifier = createCommitNotificationListener();
VerifyingPersister mockedAggregator = mockAggregator();
- try (TestingNetconfClient persisterClient = new TestingNetconfClient("persister",
tcpAddress, 4000, clientDispatcher
)) {
+ try (TestingNetconfClient persisterClient = new TestingNetconfClient("persister",
clientDispatcher, getClientConfiguration(tcpAddress, 4000)
)) {
try (ConfigPersisterNotificationHandler configPersisterNotificationHandler = new ConfigPersisterNotificationHandler(
platformMBeanServer, mockedAggregator)) {
try (ConfigPersisterNotificationHandler configPersisterNotificationHandler = new ConfigPersisterNotificationHandler(
platformMBeanServer, mockedAggregator)) {
- try (TestingNetconfClient netconfClient = new TestingNetconfClient("client",
tcpAddress, 4000, clientDispatcher
)) {
+ try (TestingNetconfClient netconfClient = new TestingNetconfClient("client",
clientDispatcher, getClientConfiguration(tcpAddress, 4000)
)) {
NetconfMessage response = netconfClient.sendMessage(loadGetConfigMessage());
assertContainsElementWithName(response.getDocument(), "modules");
assertContainsElementWithName(response.getDocument(), "services");
NetconfMessage response = netconfClient.sendMessage(loadGetConfigMessage());
assertContainsElementWithName(response.getDocument(), "modules");
assertContainsElementWithName(response.getDocument(), "services");
@@
-145,13
+143,13
@@
public class NetconfConfigPersisterITTest extends AbstractNetconfConfigTest {
}
notificationVerifier.assertNotificationCount(2);
}
notificationVerifier.assertNotificationCount(2);
- notificationVerifier.assertNotificationContent(0, 0, 0,
9
);
- notificationVerifier.assertNotificationContent(1, 4,
4, 9
);
+ notificationVerifier.assertNotificationContent(0, 0, 0,
8
);
+ notificationVerifier.assertNotificationContent(1, 4,
3, 8
);
mockedAggregator.assertSnapshotCount(2);
// Capabilities are stripped for persister
mockedAggregator.assertSnapshotContent(0, 0, 0, 1);
mockedAggregator.assertSnapshotCount(2);
// Capabilities are stripped for persister
mockedAggregator.assertSnapshotContent(0, 0, 0, 1);
- mockedAggregator.assertSnapshotContent(1, 4,
4
, 3);
+ mockedAggregator.assertSnapshotContent(1, 4,
3
, 3);
}
private VerifyingPersister mockAggregator() throws IOException {
}
private VerifyingPersister mockAggregator() throws IOException {