summaryrefslogtreecommitdiffstats
path: root/config-model-api
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2020-06-20 18:37:48 +0200
committerJon Bratseth <bratseth@gmail.com>2020-06-20 18:37:48 +0200
commitd9b15f25182ac49540ae0e3c8f6096f22731f4d8 (patch)
treeb2e5f6358820ec7f8fdfbf95aa19ae84cd9c371d /config-model-api
parent7583a8eb1aaee7093cf46f61f159e186dd4c716f (diff)
Increase max delay
Diffstat (limited to 'config-model-api')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java4
-rw-r--r--config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java4
-rw-r--r--config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecWithoutInstanceTest.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java b/config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java
index a19a83f1207..a8fcf5e1315 100644
--- a/config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java
+++ b/config-model-api/src/main/java/com/yahoo/config/application/api/DeploymentSpec.java
@@ -68,9 +68,9 @@ public class DeploymentSpec {
/** Throw an IllegalArgumentException if the total delay exceeds 24 hours */
private void validateTotalDelay(List<Step> steps) {
long totalDelaySeconds = steps.stream().mapToLong(step -> (step.delay().getSeconds())).sum();
- if (totalDelaySeconds > Duration.ofHours(24).getSeconds())
+ if (totalDelaySeconds > Duration.ofHours(48).getSeconds())
throw new IllegalArgumentException("The total delay specified is " + Duration.ofSeconds(totalDelaySeconds) +
- " but max 24 hours is allowed");
+ " but max 48 hours is allowed");
}
/** Throws an IllegalArgumentException if any instance has a looser upgrade policy than the previous */
diff --git a/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java b/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java
index a793630c8b9..06db4fe44be 100644
--- a/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java
+++ b/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecTest.java
@@ -405,7 +405,7 @@ public class DeploymentSpecTest {
" <upgrade policy='canary'/>" +
" <prod>" +
" <region active='true'>us-west-1</region>" +
- " <delay hours='23'/>" +
+ " <delay hours='47'/>" +
" <region active='true'>us-central-1</region>" +
" <delay minutes='59' seconds='61'/>" +
" <region active='true'>us-east-3</region>" +
@@ -418,7 +418,7 @@ public class DeploymentSpecTest {
}
catch (IllegalArgumentException e) {
// success
- assertEquals("The total delay specified is PT24H1S but max 24 hours is allowed", e.getMessage());
+ assertEquals("The total delay specified is PT48H1S but max 48 hours is allowed", e.getMessage());
}
}
diff --git a/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecWithoutInstanceTest.java b/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecWithoutInstanceTest.java
index 89972773e1c..450be3c9b06 100644
--- a/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecWithoutInstanceTest.java
+++ b/config-model-api/src/test/java/com/yahoo/config/application/api/DeploymentSpecWithoutInstanceTest.java
@@ -301,7 +301,7 @@ public class DeploymentSpecWithoutInstanceTest {
" <upgrade policy='canary'/>" +
" <prod>" +
" <region active='true'>us-west-1</region>" +
- " <delay hours='23'/>" +
+ " <delay hours='47'/>" +
" <region active='true'>us-central-1</region>" +
" <delay minutes='59' seconds='61'/>" +
" <region active='true'>us-east-3</region>" +
@@ -313,7 +313,7 @@ public class DeploymentSpecWithoutInstanceTest {
}
catch (IllegalArgumentException e) {
// success
- assertEquals("The total delay specified is PT24H1S but max 24 hours is allowed", e.getMessage());
+ assertEquals("The total delay specified is PT48H1S but max 48 hours is allowed", e.getMessage());
}
}