summaryrefslogtreecommitdiffstats
path: root/controller-server/src/test/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'controller-server/src/test/java/com')
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java46
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java8
3 files changed, 26 insertions, 30 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
index d9726edc496..ea9cf0385d9 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
@@ -59,7 +59,6 @@ import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.sta
import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.systemTest;
import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.testApNortheast1;
import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.testApNortheast2;
-import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.testAwsUsEast1a;
import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.testEuWest1;
import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.testUsCentral1;
import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.testUsEast3;
@@ -70,7 +69,6 @@ import static java.util.Collections.emptyList;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java
index 5b141716eaa..07d9efdf8fc 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/integration/ConfigServerMock.java
@@ -402,30 +402,28 @@ public class ConfigServerMock extends AbstractComponent implements ConfigServer
Optional.of("dns-zone-1"))));
}
- // TODO jonmv: compute on deploy, not when getting the result.
- return () -> {
- Application application = applications.get(id);
- application.activate();
- List<Node> nodes = nodeRepository.list(id.zoneId(), NodeFilter.all().applications(id.applicationId()));
- for (Node node : nodes) {
- nodeRepository.putNodes(id.zoneId(), Node.builder(node)
- .state(Node.State.active)
- .wantedVersion(application.version().get())
- .build());
- }
- serviceStatus.put(id, new ServiceConvergence(id.applicationId(),
- id.zoneId(),
- false,
- 2,
- nodes.stream()
- .map(node -> new ServiceConvergence.Status(node.hostname(),
- 43,
- "container",
- 1))
- .collect(Collectors.toList())));
-
- return new DeploymentResult("foo", warnings.getOrDefault(id, List.of()));
- };
+ Application application = applications.get(id);
+ application.activate();
+ List<Node> nodes = nodeRepository.list(id.zoneId(), NodeFilter.all().applications(id.applicationId()));
+ for (Node node : nodes) {
+ nodeRepository.putNodes(id.zoneId(), Node.builder(node)
+ .state(Node.State.active)
+ .wantedVersion(application.version().get())
+ .build());
+ }
+ serviceStatus.put(id, new ServiceConvergence(id.applicationId(),
+ id.zoneId(),
+ false,
+ 2,
+ nodes.stream()
+ .map(node -> new ServiceConvergence.Status(node.hostname(),
+ 43,
+ "container",
+ 1))
+ .collect(Collectors.toList())));
+
+ DeploymentResult result = new DeploymentResult("foo", warnings.getOrDefault(id, List.of()));
+ return () -> result;
}
@Override
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java
index 45038fc4a63..11110d6edaa 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java
@@ -747,13 +747,13 @@ public class UpgraderTest {
// Application change recorded together with ongoing upgrade
assertTrue(app.instance().change().platform().get().equals(version) &&
- app.instance().change().revision().get().equals(revision),
- "Change contains both upgrade and application change");
+ app.instance().change().revision().get().equals(revision),
+ "Change contains both upgrade and application change");
// Deployment completes
app.runJob(systemTest).runJob(stagingTest)
- .runJob(productionUsWest1)
- .runJob(productionUsEast3);
+ .runJob(productionUsWest1)
+ .runJob(productionUsEast3);
assertEquals(List.of(), tester.jobs().active(), "All jobs consumed");
for (Deployment deployment : app.instance().deployments().values()) {