private void checkReachable(NodeMetadata node) { SshClient client = view.utils().sshForNode().apply(node); assertTrue(retry(new Predicate<SshClient>() { @Override public boolean apply(SshClient input) { input.connect(); if (input.exec("id").getExitStatus() == 0) { return true; } return false; } }, getSpawnNodeMaxWait(), 1l, SECONDS).apply(client)); } }
private void checkReachable(NodeMetadata node) { SshClient client = view.utils().sshForNode().apply(node); assertTrue(retry(new Predicate<SshClient>() { @Override public boolean apply(SshClient input) { input.connect(); if (input.exec("id").getExitStatus() == 0) { return true; } return false; } }, getSpawnNodeMaxWait(), 1L, SECONDS).apply(client)); }