diff options
author | Tibor Sirovatka <tsirovat@cisco.com> | 2016-05-30 16:52:57 +0200 |
---|---|---|
committer | Tibor Sirovatka <tsirovat@cisco.com> | 2016-06-09 08:40:25 +0200 |
commit | 744551ed3b657da9f6c8d06bfed4dba4c9fc7700 (patch) | |
tree | 364de07c9a5eb1f4f5289f1624576eb5beeb1894 /v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java | |
parent | 8014d193008a60ef3857f14d57d931973daa7cc4 (diff) |
HONEYCOMB-67 Introduce exception handling into JVPP
VppApiInvocationException replaced by VPP VPPBaseCallException(s)
VppInvocationException - send request failed
VppCallbackException - operation had failed (negative result)
Change-Id: I897afead8d65ef1240e657116a0610850c62348f
Signed-off-by: Tibor Sirovatka <tsirovat@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java')
-rw-r--r-- | v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java index 79146fad3..6b91a2416 100644 --- a/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java +++ b/v3po/v3po2vpp/src/test/java/io/fd/honeycomb/v3po/translate/v3po/vppstate/VppStateTest.java @@ -65,6 +65,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.bridge.domains.bridge.domain.L2FibKey; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.openvpp.jvpp.VppInvocationException; import org.openvpp.jvpp.dto.BridgeDomainDetails; import org.openvpp.jvpp.dto.BridgeDomainDetailsReplyDump; import org.openvpp.jvpp.dto.BridgeDomainDump; @@ -112,10 +113,9 @@ public class VppStateTest { .build(); } - private void whenShowVersionThenReturn(int retval, Version version) throws ExecutionException, InterruptedException { + private void whenShowVersionThenReturn(int retval, Version version) throws ExecutionException, InterruptedException, VppInvocationException { final CompletableFuture<ShowVersionReply> replyFuture = new CompletableFuture<>(); final ShowVersionReply reply = new ShowVersionReply(); - reply.retval = 0; // success reply.buildDate = version.getBuildDate().getBytes(); reply.program = version.getName().getBytes(); reply.version = version.getBranch().getBytes(); @@ -125,7 +125,7 @@ public class VppStateTest { when(api.showVersion(any(ShowVersion.class))).thenReturn(replyFuture); } - private void whenL2FibTableDumpThenReturn(final List<L2FibTableEntry> entryList) throws ExecutionException, InterruptedException { + private void whenL2FibTableDumpThenReturn(final List<L2FibTableEntry> entryList) throws ExecutionException, InterruptedException, VppInvocationException { final CompletionStage<L2FibTableEntryReplyDump> replyCS = mock(CompletionStage.class); final CompletableFuture<L2FibTableEntryReplyDump> replyFuture = mock(CompletableFuture.class); when(replyCS.toCompletableFuture()).thenReturn(replyFuture); @@ -135,7 +135,7 @@ public class VppStateTest { when(api.l2FibTableDump(any(L2FibTableDump.class))).thenReturn(replyCS); } - private void whenBridgeDomainDumpThenReturn(final List<BridgeDomainDetails> bdList) throws ExecutionException, InterruptedException { + private void whenBridgeDomainDumpThenReturn(final List<BridgeDomainDetails> bdList) throws ExecutionException, InterruptedException, VppInvocationException { final CompletionStage<BridgeDomainDetailsReplyDump> replyCS = mock(CompletionStage.class); final CompletableFuture<BridgeDomainDetailsReplyDump> replyFuture = mock(CompletableFuture.class); when(replyCS.toCompletableFuture()).thenReturn(replyFuture); |