summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2022-03-08 10:30:51 +0100
committerJon Marius Venstad <venstad@gmail.com>2022-03-08 10:30:51 +0100
commit5f7841a5f2d28ea3cbd97d3ecdde425be20ac932 (patch)
treeea3372b8792f26bd96cdc1509f0e640fcb824e41 /controller-server
parent5d0f1f6e54a5d4bb13cbebb8055f887019d0c62c (diff)
More interesting
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/DeploymentPlayground.java (renamed from controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/DeploymentPlaygroundTest.java)18
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/deployment.xml3
2 files changed, 10 insertions, 11 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/DeploymentPlaygroundTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/DeploymentPlayground.java
index f6fce6f7403..bf41a34c62b 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/DeploymentPlaygroundTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/DeploymentPlayground.java
@@ -8,11 +8,8 @@ import com.yahoo.vespa.hosted.controller.api.integration.athenz.AthenzDbMock;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.JobType;
import com.yahoo.vespa.hosted.controller.deployment.ApplicationPackageBuilder;
import com.yahoo.vespa.hosted.controller.deployment.DeploymentContext;
-import com.yahoo.vespa.hosted.controller.deployment.DeploymentStatus;
import com.yahoo.vespa.hosted.controller.deployment.DeploymentTester;
import com.yahoo.vespa.hosted.controller.deployment.Run;
-import com.yahoo.vespa.hosted.controller.maintenance.ControllerMaintenance;
-import com.yahoo.vespa.hosted.controller.maintenance.JobRunner;
import com.yahoo.vespa.hosted.controller.restapi.ContainerTester;
import com.yahoo.vespa.hosted.controller.restapi.ControllerContainerTest;
@@ -28,19 +25,18 @@ import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.BiConsumer;
-public class DeploymentPlaygroundTest extends ControllerContainerTest {
+public class DeploymentPlayground extends ControllerContainerTest {
private final Object monitor = new Object();
- private ContainerTester tester;
private DeploymentTester deploymentTester;
@Override
protected Networking networking() { return Networking.enable; }
public static void main(String[] args) throws IOException, InterruptedException {
- DeploymentPlaygroundTest test = null;
+ DeploymentPlayground test = null;
try {
- test = new DeploymentPlaygroundTest();
+ test = new DeploymentPlayground();
test.startContainer();
test.run();
}
@@ -57,7 +53,7 @@ public class DeploymentPlaygroundTest extends ControllerContainerTest {
}
public void run() throws IOException {
- tester = new ContainerTester(container, "");
+ ContainerTester tester = new ContainerTester(container, "");
deploymentTester = new DeploymentTester(new ControllerTester(tester));
deploymentTester.controllerTester().computeVersionStatus();
@@ -76,7 +72,8 @@ public class DeploymentPlaygroundTest extends ControllerContainerTest {
}
static String readDeploymentXml() throws IOException {
- return Files.readString(Paths.get(System.getProperty("user.home") + "/git/vespa/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/deployment.xml"));
+ return Files.readString(Paths.get(System.getProperty("user.home") + "/git/" +
+ "vespa/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/deployment.xml"));
}
void repl(Map<String, DeploymentContext> instances) throws IOException {
@@ -155,7 +152,8 @@ public class DeploymentPlaygroundTest extends ControllerContainerTest {
deploymentTester.triggerJobs();
deploymentTester.runner().run();
for (Run run : deploymentTester.jobs().active())
- instances.get(run.id().application().instance().value()).runJob(run.id().type());
+ if (run.versions().sourcePlatform().map(run.versions().targetPlatform()::equals).orElse(true) || Math.random() < 0.4)
+ instances.get(run.id().application().instance().value()).runJob(run.id().type());
}
}
catch (InterruptedException e) {
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/deployment.xml b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/deployment.xml
index cd8894b155e..10e96d4145b 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/deployment.xml
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/playground/deployment.xml
@@ -8,6 +8,7 @@
<upgrade rollout="simultaneous" revision-change="when-clear" revision-target="latest" />
<prod>
<region>us-east-3</region>
+ <delay minutes="5" />
<test>us-east-3</test>
</prod>
</instance>
@@ -24,7 +25,7 @@
<test>us-central-1</test>
</steps>
<steps>
- <region>us-west-1</region>
+ <region>us-west-1</region>
<test>us-west-1</test>
</steps>
</parallel>