Skip to content

Commit

Permalink
Improve logging in InternalCommandPortListeningCheck (#3001)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcvitaly authored Apr 24, 2021
1 parent 3a6e77e commit 49a103c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ public Boolean call() {
try {
ExecResult result = ExecInContainerPattern.execInContainer(waitStrategyTarget.getContainerInfo(), "/bin/sh", "-c", command.toString());
log.trace("Check for {} took {}. Result code '{}', stdout message: '{}'", internalPorts, Duration.between(before, Instant.now()), result.getExitCode(), result.getStdout());
return result.getExitCode() == 0;
int exitCode = result.getExitCode();
if (exitCode != 0 && exitCode != 1) {
log.warn("An exception while executing the internal check: {}", result);
}
return exitCode == 0;
} catch (Exception e) {
throw new IllegalStateException(e);
}
Expand Down

0 comments on commit 49a103c

Please sign in to comment.