diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-08-12 16:25:23 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-08-12 16:25:23 +0200 |
commit | f222275505d0f83ed557b9b94fd2d2a5615ca5d8 (patch) | |
tree | e0668e81f4b33f048631a726b2664dacd0aface1 /config-proxy/src | |
parent | 43830a7f7975080dbc4c25804a2506ab102c7868 (diff) |
Add method to use Duration as timeout to make unit explicit, and avoid many magic conversions.
Diffstat (limited to 'config-proxy/src')
-rw-r--r-- | config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java | 2 | ||||
-rw-r--r-- | config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java index 02c5aeb33c7..994bdef5898 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/RpcConfigSourceClient.java @@ -84,7 +84,7 @@ class RpcConfigSourceClient implements ConfigSourceClient, Runnable { for (String configSource : configSourceSet.getSources()) { Spec spec = new Spec(configSource); Target target = supervisor.connect(spec); - target.invokeSync(req, 30.0); + target.invokeSync(req, Duration.ofSeconds(30)); if (target.isValid()) return; diff --git a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java index a946704234d..250f0705e5b 100644 --- a/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java +++ b/config-proxy/src/test/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServerTest.java @@ -309,7 +309,7 @@ public class ConfigProxyRpcServerTest { } void invoke(Request request) { - target.invokeSync(request, Duration.ofMinutes(10).getSeconds()); + target.invokeSync(request, Duration.ofMinutes(10)); } @Override |