Improve timeout message 36/58836/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 6 Jun 2017 09:19:07 +0000 (11:19 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Wed, 14 Jun 2017 11:53:11 +0000 (11:53 +0000)
Rather than reporing nanoseconds, convert them to fraction seconds.

Change-Id: I9052462990f8c6b99349ed123f682ce3f0e23461
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 715bf60ac1899a3c01690d244d26b12c9212ecc7)

opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnection.java

index abd6680..380fdeb 100644 (file)
@@ -367,8 +367,10 @@ public abstract class AbstractClientConnection<T extends BackendInfo> {
             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);

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.