diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-09-05 23:17:52 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-09-05 23:17:52 +0200 |
commit | d016c310084928c8481c72f5ed5c2cb316308bc7 (patch) | |
tree | 474313d5e6d505040c34b31636ced98487779a93 /jrt | |
parent | ffc04e71743404f903a60e83e2f24fe527e71b0c (diff) |
Add the timeout in the message too.
Diffstat (limited to 'jrt')
-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()); } |