summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2017-10-27 15:44:22 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2017-10-27 15:44:22 +0200
commitba63ef828464e33ff4fc8cd75d608bc38e003f3b (patch)
tree41aab104ab8f577c8e0f3dd222fbcfb8965fcada
parent65fa2447b809a9d8860d5aee3c2aa3f7311e1721 (diff)
Polish and assert version upgrade does not produce issue
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java
index 367901769e1..b4a2aa3fc19 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporterTest.java
@@ -64,15 +64,12 @@ public class DeploymentIssueReporterTest {
Long projectId2 = 20L;
Long projectId3 = 30L;
- // Only the first two have propertyIds set now.
Long propertyId1 = 1L;
Long propertyId2 = 2L;
Long propertyId3 = 3L;
- // Bump system version to 5.1 to upgrade canary app2 -- apps 1 and 3 have application changes.
tester.updateVersionStatus(Version.fromString("5.1"));
-
// Create and deploy one application for each of three tenants.
Application app1 = tester.createApplication("application1", "tenant1", projectId1, propertyId1);
Application app2 = tester.createApplication("application2", "tenant2", projectId2, propertyId2);
@@ -80,11 +77,12 @@ public class DeploymentIssueReporterTest {
// NOTE: All maintenance should be idempotent within a small enough time interval, so maintain is called twice in succession throughout.
- // app1 and app3 has one failure each.
+ // apps 1 and 3 have one failure each.
tester.notifyJobCompletion(component, app1, true);
tester.deployAndNotify(app1, applicationPackage, true, systemTest);
tester.deployAndNotify(app1, applicationPackage, false, stagingTest);
+ // app2 is successful, but will fail later.
tester.deployCompletely(app2, canaryPackage);
tester.notifyJobCompletion(component, app3, true);
@@ -121,10 +119,6 @@ public class DeploymentIssueReporterTest {
reporter.maintain();
reporter.maintain();
- System.err.println(tester.controller().versionStatus().version(tester.controller().systemVersion()).statistics().failing());
- System.err.println(tester.controller().systemVersion());
- System.err.println(tester.controller().applications().require(app1.id()).deploymentJobs().jobStatus().get(component).lastCompleted().get().version());
- System.err.println(tester.controller().applications().require(app1.id()).deploying().get() instanceof Change.ApplicationChange);
assertEquals("The issue for app1 is escalated once.", 1, issues.escalationLevelFor(app1.id()));
@@ -150,7 +144,6 @@ public class DeploymentIssueReporterTest {
reporter.maintain();
assertTrue("A new issue is filed for app3.", issues.isOpenFor(app3.id()));
- System.err.println(tester.controller().versionStatus().systemVersion().get().versionNumber());
// Bump system version to 5.2 to upgrade canary app2.
Version version = Version.fromString("5.2");
@@ -166,6 +159,7 @@ public class DeploymentIssueReporterTest {
reporter.maintain();
reporter.maintain();
assertTrue("We get a platform issue when confidence is broken", issues.platformIssue());
+ assertFalse("No deployment issue is filed for app2, which has a version upgrade failure.", issues.isOpenFor(app2.id()));
}