diff options
author | Jon Bratseth <bratseth@oath.com> | 2021-03-19 10:50:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-19 10:50:02 +0100 |
commit | f0d62c2ef3674939bbebfb5baabc9897e9ea4934 (patch) | |
tree | 1425610756d9ba546215fca7848273461c7362b5 /config-model | |
parent | e477cfaf1cf1860c280fa928509905845078ad2c (diff) | |
parent | e10cfbb99789ae15b87f734d5e67243ddce79f51 (diff) |
Merge pull request #17036 from vespa-engine/bratseth/dont-write-to-stderr
Don't write to standard err
Diffstat (limited to 'config-model')
2 files changed, 2 insertions, 8 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java index 909a29fd0a3..2bd343fc230 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java @@ -97,10 +97,10 @@ public class IndexedHierarchicDistributionValidator { } if (totalReadyCopies % groupCount != 0) { throw new IllegalArgumentException(getErrorMsgPrefix(clusterName) + "Expected equal amount of ready copies per group, but " + - totalReadyCopies + " ready copies is specified with " + groupCount + " groups"); + totalReadyCopies + " ready copies is specified with " + groupCount + " groups"); } if (totalReadyCopies == 0) { - System.err.println(getErrorMsgPrefix(clusterName) + "Warning. No ready copies configured. At least one is recommended."); + throw new IllegalArgumentException(getErrorMsgPrefix(clusterName) + "Warning. No ready copies configured. At least one is recommended."); } } diff --git a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java index 80ab6745b79..3be592e54e7 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java @@ -254,10 +254,4 @@ public class IndexedHierarchicDistributionTest { getTwoGroupsCluster(4, 2, "2|*"); } - @Test - public void allowNoReadyCopies() throws Exception { - // The active one should be indexed anyhow. Setting up no ready copies - getTwoGroupsCluster(4, 0, "2|*"); - } - } |