X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-remoterpc-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fremote%2Frpc%2FRemoteRpcImplementationTest.java;h=49451dd0db99114141c289750cf37f7b12e036c1;hb=b52893a2ff963a4a02a96190d78f62e9d261ffce;hp=6c3a57b3448e23ac485aa04518c788f2fad390ce;hpb=b10d77375b5a290143106180f1583ea4e18f8478;p=controller.git diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcImplementationTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcImplementationTest.java index 6c3a57b344..49451dd0db 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcImplementationTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/RemoteRpcImplementationTest.java @@ -8,27 +8,26 @@ package org.opendaylight.controller.remote.rpc; -import static org.junit.Assert.assertEquals; -import java.net.URI; -import java.util.Arrays; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicReference; - +import akka.testkit.JavaTestKit; +import com.google.common.util.concurrent.ListenableFuture; import org.junit.Test; import org.opendaylight.controller.remote.rpc.messages.InvokeRpc; import org.opendaylight.controller.remote.rpc.messages.RpcResponse; import org.opendaylight.controller.xml.codec.XmlUtils; import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.common.RpcResult; -import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.opendaylight.yangtools.yang.common.RpcError.ErrorSeverity; import org.opendaylight.yangtools.yang.common.RpcError.ErrorType; +import org.opendaylight.yangtools.yang.common.RpcResult; +import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.opendaylight.yangtools.yang.data.api.CompositeNode; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import akka.testkit.JavaTestKit; +import java.net.URI; +import java.util.Arrays; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; -import com.google.common.util.concurrent.ListenableFuture; +import static org.junit.Assert.assertEquals; /*** * Unit tests for RemoteRpcImplementation. @@ -42,7 +41,7 @@ public class RemoteRpcImplementationTest extends AbstractRpcTest { final AtomicReference assertError = new AtomicReference<>(); try { RemoteRpcImplementation rpcImpl = new RemoteRpcImplementation( - probeReg1.getRef(), schemaContext); + probeReg1.getRef(), schemaContext, getConfig()); final CompositeNode input = makeRPCInput("foo"); final CompositeNode output = makeRPCOutput("bar"); @@ -68,7 +67,7 @@ public class RemoteRpcImplementationTest extends AbstractRpcTest { final AtomicReference assertError = new AtomicReference<>(); try { RemoteRpcImplementation rpcImpl = new RemoteRpcImplementation( - probeReg1.getRef(), schemaContext); + probeReg1.getRef(), schemaContext, getConfig()); QName instanceQName = new QName(new URI("ns"), "instance"); YangInstanceIdentifier identifier = YangInstanceIdentifier.of(instanceQName); @@ -99,7 +98,7 @@ public class RemoteRpcImplementationTest extends AbstractRpcTest { final AtomicReference assertError = new AtomicReference<>(); try { RemoteRpcImplementation rpcImpl = new RemoteRpcImplementation( - probeReg1.getRef(), schemaContext); + probeReg1.getRef(), schemaContext, getConfig()); final CompositeNode input = makeRPCInput("foo"); @@ -125,7 +124,7 @@ public class RemoteRpcImplementationTest extends AbstractRpcTest { final AtomicReference assertError = new AtomicReference<>(); try { RemoteRpcImplementation rpcImpl = new RemoteRpcImplementation( - probeReg1.getRef(), schemaContext); + probeReg1.getRef(), schemaContext, getConfig()); final CompositeNode input = makeRPCInput("foo"); @@ -182,4 +181,8 @@ public class RemoteRpcImplementationTest extends AbstractRpcTest { return invokeRpcMsg; } + + private RemoteRpcProviderConfig getConfig(){ + return new RemoteRpcProviderConfig.Builder("unit-test").build(); + } }