diff --git a/integration-test-common/src/test/java/com/datastrato/gravitino/integration/test/container/HiveContainer.java b/integration-test-common/src/test/java/com/datastrato/gravitino/integration/test/container/HiveContainer.java index 26dc124ef16..c33a44da709 100644 --- a/integration-test-common/src/test/java/com/datastrato/gravitino/integration/test/container/HiveContainer.java +++ b/integration-test-common/src/test/java/com/datastrato/gravitino/integration/test/container/HiveContainer.java @@ -88,6 +88,16 @@ protected boolean checkContainerStatus(int retryLimit) { int sleepTimeMillis = 10_000; while (nRetry++ < retryLimit) { try { + String[] testSSHCommand = new String[] {"ssh", "localhost"}; + Container.ExecResult result = executeInContainer(testSSHCommand); + if (result.getExitCode() != 0) { + throw new RuntimeException( + "Failed to execute `ssh localhost` command: stdout=" + + result.getStdout() + + ", stderr=" + + result.getStderr()); + } + String[] commandAndArgs = new String[] {"bash", "/tmp/check-status.sh"}; Container.ExecResult execResult = executeInContainer(commandAndArgs); if (execResult.getExitCode() != 0) {