Skip to content

Commit

Permalink
Merge pull request #31461 from vespa-engine/bratseth/reduce-staging-size
Browse files Browse the repository at this point in the history
Reduce staging test size to 5%
  • Loading branch information
bratseth authored Jun 5, 2024
2 parents 256c6bf + f468d8b commit 4f09ea3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private int decideCount(int requested, boolean required, boolean isTester) {
return switch (zone.environment()) {
case dev, test -> 1;
case perf -> Math.min(requested, 3);
case staging -> requested <= 1 ? requested : Math.max(2, requested / 10);
case staging -> requested <= 1 ? requested : Math.max(2, (int)(0.05 * requested));
case prod -> requested;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public void node_resources_are_reduced_in_staging() {
ApplicationId application = ProvisioningTester.applicationId();
ClusterSpec cluster = ClusterSpec.request(ClusterSpec.Type.content, ClusterSpec.Id.from("test")).vespaVersion("1").build();

List<HostSpec> hosts = tester.prepare(application, cluster, 36, 2, resources);
List<HostSpec> hosts = tester.prepare(application, cluster, 66, 2, resources);
tester.activate(application, hosts);
assertEquals(3, hosts.size());
assertEquals(1, hosts.stream().map(host -> host.membership().get().cluster().group().get()).distinct().count());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ public void staging_deployment_size() {
ApplicationId application = ProvisioningTester.applicationId();
tester.makeReadyHosts(14, defaultResources).activateTenantHosts();
SystemState state = prepare(application, 1, 1, 1, 64, defaultResources, tester); // becomes 1, 1, 1, 1, 6
assertEquals(9, state.allHosts.size());
assertEquals(6, state.allHosts.size());
tester.activate(application, state.allHosts);
}

Expand Down

0 comments on commit 4f09ea3

Please sign in to comment.