diff options
author | Jon Bratseth <bratseth@gmail.com> | 2023-01-21 17:50:10 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2023-01-21 17:50:10 +0100 |
commit | 7a6af9caa065b3ab63b094d78b7347d7df6bea0f (patch) | |
tree | 48e80650a9cd88016ff8e618d85d727a28f3542c /config-provisioning/src/test/java/com/yahoo | |
parent | 00d86602a88c66486c8f4c68a1c8bdff096c7273 (diff) |
Support a group size constraint in content clusters
Diffstat (limited to 'config-provisioning/src/test/java/com/yahoo')
-rw-r--r-- | config-provisioning/src/test/java/com/yahoo/config/provision/CapacityTest.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/config-provisioning/src/test/java/com/yahoo/config/provision/CapacityTest.java b/config-provisioning/src/test/java/com/yahoo/config/provision/CapacityTest.java index a6ddb401b2f..ca552003f7a 100644 --- a/config-provisioning/src/test/java/com/yahoo/config/provision/CapacityTest.java +++ b/config-provisioning/src/test/java/com/yahoo/config/provision/CapacityTest.java @@ -1,8 +1,11 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.config.provision; +import com.yahoo.collections.IntRange; import org.junit.jupiter.api.Test; +import java.util.Optional; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.fail; @@ -15,8 +18,11 @@ public class CapacityTest { void testCapacityValidation() { // Equal min and max is allowed Capacity.from(new ClusterResources(4, 2, new NodeResources(1, 2, 3, 4)), - new ClusterResources(4, 2, new NodeResources(1, 2, 3, 4)), - false, true); + new ClusterResources(4, 2, new NodeResources(1, 2, 3, 4)), + IntRange.empty(), + false, + true, + Optional.empty()); assertValidationFailure(new ClusterResources(4, 2, new NodeResources(1, 2, 3, 4)), new ClusterResources(2, 2, new NodeResources(1, 2, 3, 4))); assertValidationFailure(new ClusterResources(4, 4, new NodeResources(1, 2, 3, 4)), @@ -36,7 +42,7 @@ public class CapacityTest { private void assertValidationFailure(ClusterResources min, ClusterResources max) { try { - Capacity.from(min, max, false, true); + Capacity.from(min, max, IntRange.empty(), false, true, Optional.empty()); fail("Expected exception with min " + min + " and max " + max); } catch (IllegalArgumentException e) { |