From 3a4510523d25b10905645c21b1bfbab44138ba81 Mon Sep 17 00:00:00 2001 From: Tom Pantelis Date: Thu, 13 Dec 2018 10:10:23 -0500 Subject: [PATCH] Improve error reporting in MdsalLowLevelTestProvider Change-Id: Icdd86af5601f14d54b54354a1e0a3ffd4dc81653 Signed-off-by: Tom Pantelis --- .../it/provider/MdsalLowLevelTestProvider.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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()); -- 2.36.6