diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-08-20 15:15:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 15:15:46 +0200 |
commit | 8e76b51ff9156d46734a6cddf4d73f7386f36bb2 (patch) | |
tree | f4dd8ebf96e66af76b30305e011ca199d7ff006a | |
parent | 7aa39dd1e650c88989dec9d22188522603f2124e (diff) | |
parent | 164a1a7cae616c15be8fac701c4e831d2c3bbeb4 (diff) |
Merge pull request #6632 from vespa-engine/jvenstad/testrunner-logging
Print stack trace to log
2 files changed, 8 insertions, 11 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java index 9711c1d8533..e87db02c9bd 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java @@ -524,6 +524,8 @@ public class InternalStepRunner implements StepRunner { String timestamp = timestampFormat.format(new Date(record.getMillis())); for (String line : record.getMessage().split("\n")) out.println(timestamp + ": " + line); + if (record.getThrown() != null) + record.getThrown().printStackTrace(out); record.setSourceClassName(null); // Makes the root logger's ConsoleHandler use the logger name instead, when printing. getParent().log(record); diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Versions.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Versions.java index 719fa7b46dc..1ec64e1b3d6 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Versions.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Versions.java @@ -9,6 +9,7 @@ import com.yahoo.vespa.hosted.controller.application.Change; import com.yahoo.vespa.hosted.controller.application.Deployment; import com.yahoo.vespa.hosted.controller.application.JobStatus; +import java.util.Objects; import java.util.Optional; import static java.util.Objects.requireNonNull; @@ -74,22 +75,16 @@ public class Versions { public boolean equals(Object o) { if (this == o) return true; if ( ! (o instanceof Versions)) return false; - Versions versions = (Versions) o; - - if ( ! targetPlatform.equals(versions.targetPlatform)) return false; - if ( ! targetApplication.equals(versions.targetApplication)) return false; - if ( ! sourcePlatform.equals(versions.sourcePlatform)) return false; - return sourceApplication.equals(versions.sourceApplication); + return Objects.equals(targetPlatform, versions.targetPlatform) && + Objects.equals(targetApplication, versions.targetApplication) && + Objects.equals(sourcePlatform, versions.sourcePlatform) && + Objects.equals(sourceApplication, versions.sourceApplication); } @Override public int hashCode() { - int result = targetPlatform.hashCode(); - result = 31 * result + targetApplication.hashCode(); - result = 31 * result + sourcePlatform.hashCode(); - result = 31 * result + sourceApplication.hashCode(); - return result; + return Objects.hash(targetPlatform, targetApplication, sourcePlatform, sourceApplication); } @Override |