From: Tom Pantelis Date: Thu, 13 Dec 2018 15:10:23 +0000 (-0500) Subject: Improve error reporting in MdsalLowLevelTestProvider X-Git-Tag: release/neon~40 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=refs%2Fchanges%2F58%2F78758%2F1;hp=9f25e30ecd6ff1fb24e018990e0e9ea97179711a Improve error reporting in MdsalLowLevelTestProvider Change-Id: Icdd86af5601f14d54b54354a1e0a3ffd4dc81653 Signed-off-by: Tom Pantelis --- diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/MdsalLowLevelTestProvider.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/MdsalLowLevelTestProvider.java index 92bacd1f89..df314c1271 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/MdsalLowLevelTestProvider.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/MdsalLowLevelTestProvider.java @@ -537,9 +537,8 @@ public class MdsalLowLevelTestProvider implements OdlMdsalLowlevelControlService dtclReg = null; if (!idIntsListener.hasTriggered()) { - final RpcError error = RpcResultBuilder.newError( - ErrorType.APPLICATION, "No notification received.", "id-ints listener has not received" - + "any notifications."); + final RpcError error = RpcResultBuilder.newError(ErrorType.APPLICATION, "data-missing", + "id-ints listener did not receive any notifications."); return Futures.immediateFuture(RpcResultBuilder.failed() .withRpcError(error).build()); } @@ -551,7 +550,7 @@ public class MdsalLowLevelTestProvider implements OdlMdsalLowlevelControlService if (!readResult.isPresent()) { final RpcError error = RpcResultBuilder.newError( - ErrorType.APPLICATION, "Final read empty.", "No data read from id-ints list."); + ErrorType.APPLICATION, "data-missing", "No data read from id-ints list."); return Futures.immediateFuture(RpcResultBuilder.failed() .withRpcError(error).build()); } @@ -567,7 +566,7 @@ public class MdsalLowLevelTestProvider implements OdlMdsalLowlevelControlService } catch (final InterruptedException | ExecutionException e) { final RpcError error = RpcResultBuilder.newError( - ErrorType.APPLICATION, "Read failed.", "Final read from id-ints failed."); + ErrorType.APPLICATION, "operation-failed", "Final read from id-ints failed.", null, null, e); return Futures.immediateFuture(RpcResultBuilder.failed() .withRpcError(error).build());