summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-03-23 09:17:49 +0100
committerGitHub <noreply@github.com>2021-03-23 09:17:49 +0100
commita8b13d2ceb9f4f48f46964a851fcfb644d869c00 (patch)
tree8ed2e09a2937f6ac70e70a4a921e7ae1b8a23bba /config-model
parenta608e846d491e7bd274acee7670427783fcfd6e9 (diff)
Revert "Revert "Revert "Revert "Don't write to standard err""""
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionValidator.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/content/IndexedHierarchicDistributionTest.java6
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..dcb9ca17ef4 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 required.");
}
}
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|*");
- }
-
}