aboutsummaryrefslogtreecommitdiffstats
path: root/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java
diff options
context:
space:
mode:
authorHÃ¥kon Hallingstad <hakon@verizonmedia.com>2021-11-30 17:07:17 +0100
committerGitHub <noreply@github.com>2021-11-30 17:07:17 +0100
commitaa3ffac0caaba2c60fabc585be8376cfe132c17d (patch)
tree9b150af98aa9dfff7d552b5c63698d49d48e7805 /node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java
parent318edd10866b25b06419ed6069227eafbe63d685 (diff)
parent612cba5886325c1b6ed627d7ca35fa2a2511e625 (diff)
Merge pull request #20302 from vespa-engine/revert-20298-bratseth/autoscaling-in-devv7.508.20
Revert "Account for capacity policies when autoscaling"
Diffstat (limited to 'node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java')
-rw-r--r--node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java
index bd7300ad6bf..0e37d953d2d 100644
--- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java
+++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/autoscale/ClusterModelTest.java
@@ -2,12 +2,12 @@
package com.yahoo.vespa.hosted.provision.autoscale;
import com.yahoo.config.provision.ApplicationId;
-import com.yahoo.config.provision.Capacity;
import com.yahoo.config.provision.ClusterResources;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.NodeResources;
import com.yahoo.test.ManualClock;
import com.yahoo.vespa.hosted.provision.applications.Application;
+import com.yahoo.vespa.hosted.provision.applications.AutoscalingStatus;
import com.yahoo.vespa.hosted.provision.applications.Cluster;
import com.yahoo.vespa.hosted.provision.applications.Status;
import org.junit.Test;
@@ -15,6 +15,7 @@ import org.junit.Test;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
+import java.util.Optional;
import java.util.function.IntFunction;
import static org.junit.Assert.assertEquals;
@@ -72,9 +73,14 @@ public class ClusterModelTest {
}
private Cluster cluster(NodeResources resources) {
- return Cluster.create(ClusterSpec.Id.from("test"),
- false,
- Capacity.from(new ClusterResources(5, 1, resources)));
+ return new Cluster(ClusterSpec.Id.from("test"),
+ false,
+ new ClusterResources(5, 1, resources),
+ new ClusterResources(5, 1, resources),
+ Optional.empty(),
+ Optional.empty(),
+ List.of(),
+ AutoscalingStatus.empty());
}
/** Creates the given number of measurements, spaced 5 minutes between, using the given function */