diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-11-30 08:02:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-30 08:02:57 +0100 |
commit | 1b5756c4bce4a3c7628ca35fa1abe9b74754f596 (patch) | |
tree | 9f84b6cc579150e7e5d4494d007f71908e3d6add /node-repository | |
parent | 200d1b30b475babc684b2c1e608c44e0e8f7ac25 (diff) | |
parent | 3cf13b61b9ddc7b9e623415db006b4cbfc2ce8cd (diff) |
Merge pull request #15507 from vespa-engine/mpolden/read-stateful-property
Read stateful tag in ClusterMembership
Diffstat (limited to 'node-repository')
2 files changed, 3 insertions, 11 deletions
diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DockerProvisioningTest.java b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DockerProvisioningTest.java index e046bc0a512..f368f4d139c 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DockerProvisioningTest.java +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DockerProvisioningTest.java @@ -75,7 +75,6 @@ public class DockerProvisioningTest { public void refuses_to_activate_on_non_active_host() { ProvisioningTester tester = new ProvisioningTester.Builder().zone(new Zone(Environment.prod, RegionName.from("us-east"))).build(); - ApplicationId zoneApplication = ProvisioningTester.applicationId(); List<Node> parents = tester.makeReadyNodes(10, new NodeResources(2, 4, 20, 2), NodeType.host, 1); for (Node parent : parents) tester.makeReadyVirtualDockerNodes(1, dockerResources, parent.hostname()); @@ -90,11 +89,8 @@ public class DockerProvisioningTest { fail("Expected the allocation to fail due to parent hosts not being active yet"); } catch (OutOfCapacityException expected) { } - // Activate the zone-app, thereby allocating the parents - List<HostSpec> hosts = tester.prepare(zoneApplication, - ClusterSpec.request(ClusterSpec.Type.container, ClusterSpec.Id.from("zone-app")).vespaVersion(wantedVespaVersion).build(), - Capacity.fromRequiredNodeType(NodeType.host)); - tester.activate(zoneApplication, hosts); + // Activate the hosts, thereby allocating the parents + tester.activateTenantHosts(); // Try allocating tenants again List<HostSpec> nodes = tester.prepare(application1, @@ -412,10 +408,6 @@ public class DockerProvisioningTest { return nodes.asList().stream().map(Node::parentHostname).map(Optional::get).collect(Collectors.toSet()); } - private void prepareAndActivate(ApplicationId application, int nodeCount, boolean exclusive, ProvisioningTester tester) { - prepareAndActivate(application, nodeCount, exclusive, dockerResources, tester); - } - private void prepareAndActivate(ApplicationId application, int nodeCount, boolean exclusive, NodeResources resources, ProvisioningTester tester) { Set<HostSpec> hosts = new HashSet<>(tester.prepare(application, ClusterSpec.request(ClusterSpec.Type.container, ClusterSpec.Id.from("myContainer")).vespaVersion("6.39").exclusive(exclusive).build(), diff --git a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json index f6b2f96023a..7104957ba98 100644 --- a/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json +++ b/node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/responses/capacity-zone.json @@ -43,4 +43,4 @@ } ] } -}
\ No newline at end of file +} |