duncangrant commented on a change in pull request #1090:
URL: https://github.com/apache/brooklyn-server/pull/1090#discussion_r412966301



##########
File path: 
locations/container/src/main/java/org/apache/brooklyn/container/location/kubernetes/KubernetesLocation.java
##########
@@ -471,19 +493,16 @@ protected String getContainerResourceType() {
     }
 
     protected void waitForSshable(final SshMachineLocation machine, Duration 
timeout) {
-        Callable<Boolean> checker = new Callable<Boolean>() {
-            public Boolean call() {
-                int exitstatus = machine.execScript(
-                        ImmutableMap.of( // TODO investigate why SSH 
connection does not time out with this config
-                                SshTool.PROP_CONNECT_TIMEOUT.getName(), 
Duration.TEN_SECONDS.toMilliseconds(),
-                                SshTool.PROP_SESSION_TIMEOUT.getName(), 
Duration.TEN_SECONDS.toMilliseconds(),
-                                SshTool.PROP_SSH_TRIES_TIMEOUT.getName(), 
Duration.TEN_SECONDS.toMilliseconds(),
-                                SshTool.PROP_SSH_TRIES.getName(), 1),
-                        "check-sshable",
-                        ImmutableList.of("true"));
-                boolean success = (exitstatus == 0);
-                return success;
-            }
+        Callable<Boolean> checker = () -> {
+            int exitstatus = machine.execScript(
+                    ImmutableMap.of( // TODO investigate why SSH connection 
does not time out with this config
+                            SshTool.PROP_CONNECT_TIMEOUT.getName(), 
Duration.TEN_SECONDS.toMilliseconds(),
+                            SshTool.PROP_SESSION_TIMEOUT.getName(), 
Duration.TEN_SECONDS.toMilliseconds(),
+                            SshTool.PROP_SSH_TRIES_TIMEOUT.getName(), 
Duration.TEN_SECONDS.toMilliseconds(),
+                            SshTool.PROP_SSH_TRIES.getName(), 1),
+                    "check-sshable",
+                    ImmutableList.of("true"));
+            return (exitstatus == 0);

Review comment:
       nice tidy - thanks




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to