X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-topology-singleton%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Ftopology%2Fsingleton%2Fimpl%2Ftx%2FWriteOnlyTransactionTest.java;h=a13c9536254e6101c2b21f2bcf22fea53e1f2ae2;hb=0a95f4298a7f467b6c2eebf7904c8253cf3d5198;hp=9cd9adcaeecbd337ab43f2576a278414e7fc3815;hpb=0daed243d5fa216f5274ad9257f9692dd91c77eb;p=netconf.git diff --git a/netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/tx/WriteOnlyTransactionTest.java b/netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/tx/WriteOnlyTransactionTest.java index 9cd9adcaee..a13c953625 100644 --- a/netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/tx/WriteOnlyTransactionTest.java +++ b/netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/tx/WriteOnlyTransactionTest.java @@ -27,9 +27,9 @@ import akka.testkit.JavaTestKit; import akka.testkit.TestActorRef; import akka.util.Timeout; import com.google.common.collect.Lists; +import com.google.common.net.InetAddresses; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; -import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.List; import java.util.concurrent.TimeUnit; @@ -92,7 +92,7 @@ public class WriteOnlyTransactionTest { system = ActorSystem.create(); final RemoteDeviceId remoteDeviceId = new RemoteDeviceId("netconf-topology", - new InetSocketAddress(InetAddress.getByName("127.0.0.1"), 9999)); + new InetSocketAddress(InetAddresses.forString("127.0.0.1"), 9999)); final NetconfTopologySetup setup = mock(NetconfTopologySetup.class); doReturn(Duration.apply(0, TimeUnit.SECONDS)).when(setup).getIdleTimeout(); @@ -116,8 +116,8 @@ public class WriteOnlyTransactionTest { new ProxyDOMDataBroker(system, remoteDeviceId, masterRef, Timeout.apply(5, TimeUnit.SECONDS)); initializeDataTest(); testNode = ImmutableContainerNodeBuilder.create() - .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(QName.create("TestQname"))) - .withChild(ImmutableNodes.leafNode(QName.create("NodeQname"), "foo")).build(); + .withNodeIdentifier(new YangInstanceIdentifier.NodeIdentifier(QName.create("", "TestQname"))) + .withChild(ImmutableNodes.leafNode(QName.create("", "NodeQname"), "foo")).build(); instanceIdentifier = YangInstanceIdentifier.EMPTY; storeType = LogicalDatastoreType.CONFIGURATION; } @@ -152,15 +152,12 @@ public class WriteOnlyTransactionTest { @Test public void testDelete() throws Exception { - final YangInstanceIdentifier instanceIdentifier = YangInstanceIdentifier.EMPTY; - final LogicalDatastoreType storeType = LogicalDatastoreType.CONFIGURATION; - // Test of invoking delete on master through slave proxy final DOMDataWriteTransaction wTx = slaveDataBroker.newWriteOnlyTransaction(); - wTx.delete(storeType, instanceIdentifier); + wTx.delete(LogicalDatastoreType.CONFIGURATION, YangInstanceIdentifier.EMPTY); wTx.cancel(); - verify(writeTx, timeout(2000)).delete(storeType, instanceIdentifier); + verify(writeTx, timeout(2000)).delete(LogicalDatastoreType.CONFIGURATION, YangInstanceIdentifier.EMPTY); } @Test @@ -180,7 +177,8 @@ public class WriteOnlyTransactionTest { @Test public void testSubmitWithOperation() throws Exception { - final CheckedFuture resultSubmitTx = Futures.immediateCheckedFuture(null); + final CheckedFuture resultSubmitTx = + Futures.immediateCheckedFuture(null); doReturn(resultSubmitTx).when(writeTx).submit(); // With Tx final DOMDataWriteTransaction wTx = slaveDataBroker.newWriteOnlyTransaction();