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 abd668010a16ad09c3c0d573c0a0320cd59a9e85..380fdeb862bdb8fbb64b79cae0594803dd7fde7c 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);