diff options
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownLiveConfigTest.java')
-rw-r--r-- | clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownLiveConfigTest.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownLiveConfigTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownLiveConfigTest.java index a498f26fb7d..2801759e31e 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownLiveConfigTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/GroupAutoTakedownLiveConfigTest.java @@ -12,6 +12,8 @@ import static org.junit.jupiter.api.Assertions.assertFalse; @ExtendWith(CleanupZookeeperLogsOnSuccess.class) public class GroupAutoTakedownLiveConfigTest extends FleetControllerTest { + private final Timer timer = new FakeTimer(); + private static FleetControllerOptions.Builder createOptions(DistributionBuilder.GroupBuilder groupBuilder, double minNodeRatio) { return defaultOptions("mycluster") .setStorageDistribution(DistributionBuilder.forHierarchicCluster(groupBuilder)) @@ -41,8 +43,8 @@ public class GroupAutoTakedownLiveConfigTest extends FleetControllerTest { private FleetControllerOptions setUp3x3ClusterWithMinNodeRatio(double minNodeRatio) throws Exception { FleetControllerOptions.Builder options = createOptions(DistributionBuilder.withGroups(3).eachWithNodeCount(3), minNodeRatio); - setUpFleetController(true, options); - setUpVdsNodes(true, false, 9); + setUpFleetController(timer, options); + setUpVdsNodes(timer, false, 9); waitForState("version:\\d+ distributor:9 storage:9"); return options.build(); } @@ -59,7 +61,7 @@ public class GroupAutoTakedownLiveConfigTest extends FleetControllerTest { void bootstrap_min_ratio_option_is_propagated_to_group_availability_logic() throws Exception { setUp3x3ClusterWithMinNodeRatio(0.67); takeDownContentNode(0); - waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .0.s:d .1.s:d .2.s:d", asIntSet(0)); + waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .0.s:d .1.s:d .2.s:d", asIntSet(0), timer); } @Test @@ -67,14 +69,14 @@ public class GroupAutoTakedownLiveConfigTest extends FleetControllerTest { // Initially, arbitrarily many nodes may be down in a group. var options = setUp3x3ClusterWithMinNodeRatio(0.0); takeDownContentNode(3); - waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .3.s:d", asIntSet(3)); + waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .3.s:d", asIntSet(3), timer); reconfigureWithMinNodeRatio(options, 0.67); - waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .3.s:d .4.s:d .5.s:d", asIntSet(3)); + waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .3.s:d .4.s:d .5.s:d", asIntSet(3), timer); reconfigureWithMinNodeRatio(options, 0.0); // Aaaand back up again! - waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .3.s:d", asIntSet(3)); + waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .3.s:d", asIntSet(3), timer); } @Test @@ -83,10 +85,10 @@ public class GroupAutoTakedownLiveConfigTest extends FleetControllerTest { takeDownContentNode(6); // Not enough nodes down to trigger group take-down yet - waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .6.s:d", asIntSet(6)); + waitForStateExcludingNodeSubset("version:\\d+ distributor:9 storage:9 .6.s:d", asIntSet(6), timer); // Removing a node from the same group as node 6 will dip it under the configured threshold, // taking down the entire group. In this case we configure out node 8. reconfigureWithDistribution(options, DistributionBuilder.withGroupNodes(3, 3, 2)); - waitForStateExcludingNodeSubset("version:\\d+ distributor:8 storage:6", asIntSet(6, 8)); + waitForStateExcludingNodeSubset("version:\\d+ distributor:8 storage:6", asIntSet(6, 8), timer); } } |