diff options
author | Jon Bratseth <jonbratseth@yahoo.com> | 2017-09-06 07:46:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 07:46:04 +0200 |
commit | efcf47c22d336894bc209a6be0812cb306e4e722 (patch) | |
tree | 474313d5e6d505040c34b31636ced98487779a93 | |
parent | ffc04e71743404f903a60e83e2f24fe527e71b0c (diff) | |
parent | d016c310084928c8481c72f5ed5c2cb316308bc7 (diff) |
Merge pull request #3337 from vespa-engine/balder/tell-how-long-it-waited
Add the timeout in the message too.
-rw-r--r-- | jrt/src/com/yahoo/jrt/InvocationClient.java | 2 | ||||
-rw-r--r-- | jrt/tests/com/yahoo/jrt/TimeoutTest.java | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/jrt/src/com/yahoo/jrt/InvocationClient.java b/jrt/src/com/yahoo/jrt/InvocationClient.java index ed95976f546..0b01ea0935b 100644 --- a/jrt/src/com/yahoo/jrt/InvocationClient.java +++ b/jrt/src/com/yahoo/jrt/InvocationClient.java @@ -89,7 +89,7 @@ class InvocationClient implements ReplyHandler, Runnable { if (!conn.cancelReply(this)) { return; } - req.setError(ErrorCode.TIMEOUT, "Request timed out"); + req.setError(ErrorCode.TIMEOUT, "Request timed out after " + timeout + " seconds."); reqWaiter.handleRequestDone(req); } } diff --git a/jrt/tests/com/yahoo/jrt/TimeoutTest.java b/jrt/tests/com/yahoo/jrt/TimeoutTest.java index 363ac8cde59..ce9bb954d74 100644 --- a/jrt/tests/com/yahoo/jrt/TimeoutTest.java +++ b/jrt/tests/com/yahoo/jrt/TimeoutTest.java @@ -56,6 +56,7 @@ public class TimeoutTest extends junit.framework.TestCase { assertTrue(req.isError()); assertEquals(ErrorCode.TIMEOUT, req.errorCode()); + assertEquals("Request timed out after 0.1 seconds.", req.errorMessage()); assertEquals(0, req.returnValues().size()); } |