diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-03 13:45:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-03 13:45:09 +0100 |
commit | 4f9b53d052fda832c166b44f416c9920dc9eb373 (patch) | |
tree | ed7abf854338845c0b6b009f71069ae2dbc14526 /config-model | |
parent | 6f78fdc9750ad3ac03b14166b6838c628487458c (diff) | |
parent | 041b76bd3e79e2fbd1bd7406777cbe41ed550395 (diff) |
Merge pull request #21513 from vespa-engine/hmusum/cosmetic-fixes
Cosmetic changes
Diffstat (limited to 'config-model')
2 files changed, 6 insertions, 7 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/StartupCommandChangeValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/StartupCommandChangeValidator.java index 41710181706..59b2af0835f 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/StartupCommandChangeValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/StartupCommandChangeValidator.java @@ -16,7 +16,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; /** - * Compares the startup command for the services in the next model with the ones in the old model. + * Compares the startup command for the services in the next model with the ones in the current model. * If the startup command has changes, a change entry is created and reported back. * * @author bjorncs @@ -26,11 +26,11 @@ public class StartupCommandChangeValidator implements ChangeValidator { @Override public List<ConfigChangeAction> validate(VespaModel currentModel, VespaModel nextModel, ValidationOverrides overrides, Instant now) { - return findServicesWithChangedStartupCommmand(currentModel, nextModel).collect(Collectors.toList()); + return findServicesWithChangedStartupCommand(currentModel, nextModel).collect(Collectors.toList()); } - public Stream<ConfigChangeAction> findServicesWithChangedStartupCommmand(AbstractConfigProducerRoot currentModel, - AbstractConfigProducerRoot nextModel) { + public Stream<ConfigChangeAction> findServicesWithChangedStartupCommand(AbstractConfigProducerRoot currentModel, + AbstractConfigProducerRoot nextModel) { return nextModel.getDescendantServices().stream() .map(nextService -> currentModel.getService(nextService.getConfigId()) .flatMap(currentService -> compareStartupCommand(currentService, nextService))) @@ -44,7 +44,7 @@ public class StartupCommandChangeValidator implements ChangeValidator { if (Objects.equals(currentCommand, nextCommand)) return Optional.empty(); - String message = String.format("Startup command for '%s' has changed.\nNew command: %s.\nOld command: %s.", + String message = String.format("Startup command for '%s' has changed.\nNew command: %s\nCurrent command: %s", currentService.getServiceName(), nextCommand, currentCommand); return Optional.of(new VespaRestartAction(ClusterSpec.Id.from(currentService.getConfigId()), message, diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StartupCommandChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StartupCommandChangeValidatorTest.java index dddab5c2a2a..952b89a6ab1 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StartupCommandChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/StartupCommandChangeValidatorTest.java @@ -9,7 +9,6 @@ import com.yahoo.vespa.model.AbstractService; import com.yahoo.vespa.model.Host; import com.yahoo.vespa.model.HostResource; import com.yahoo.vespa.model.PortAllocBridge; -import com.yahoo.vespa.model.application.validation.change.StartupCommandChangeValidator; import org.junit.Test; import java.util.Arrays; @@ -48,7 +47,7 @@ public class StartupCommandChangeValidatorTest { private static List<ConfigChangeAction> getStartupCommandChanges( AbstractConfigProducerRoot currentModel, AbstractConfigProducerRoot nextModel) { StartupCommandChangeValidator validator = new StartupCommandChangeValidator(); - return validator.findServicesWithChangedStartupCommmand(currentModel, nextModel).collect(Collectors.toList()); + return validator.findServicesWithChangedStartupCommand(currentModel, nextModel).collect(Collectors.toList()); } private static MockRoot createRootWithChildren(AbstractConfigProducer<?>... children) { |