From 715bf60ac1899a3c01690d244d26b12c9212ecc7 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 6 Jun 2017 11:19:07 +0200 Subject: [PATCH] Improve timeout message Rather than reporing nanoseconds, convert them to fraction seconds. Change-Id: I9052462990f8c6b99349ed123f682ce3f0e23461 Signed-off-by: Robert Varga --- .../cluster/access/client/AbstractClientConnection.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnection.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnection.java index abd668010a..380fdeb862 100644 --- a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnection.java +++ b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnection.java @@ -367,8 +367,10 @@ public abstract class AbstractClientConnection { tasksTimedOut++; queue.remove(now); LOG.debug("{}: Connection {} timed out entry {}", context.persistenceId(), this, head); + + final double time = (beenOpen * 1.0) / 1_000_000_000; head.complete(head.getRequest().toRequestFailure( - new RequestTimeoutException("Timed out after " + beenOpen + "ns"))); + new RequestTimeoutException("Timed out after " + time + "seconds"))); } LOG.debug("Connection {} timed out {} tasks", this, tasksTimedOut); -- 2.36.6