diff --git a/magenta-lib/src/main/scala/magenta/deployment_type/AutoScaling.scala b/magenta-lib/src/main/scala/magenta/deployment_type/AutoScaling.scala index 54dcb2003..f95bd0ce5 100644 --- a/magenta-lib/src/main/scala/magenta/deployment_type/AutoScaling.scala +++ b/magenta-lib/src/main/scala/magenta/deployment_type/AutoScaling.scala @@ -197,12 +197,12 @@ object AutoScaling extends DeploymentType with BucketParameters { target.region, terminationGrace(pkg, target, reporter) * 1000 ), + ResumeAlarmNotifications(autoScalingGroup, target.region), WaitForStabilization( autoScalingGroup, secondsToWait(pkg, target, reporter) * 1000, target.region - ), - ResumeAlarmNotifications(autoScalingGroup, target.region) + ) ) } val groupsToUpdate: List[AutoScalingGroupInfo] = diff --git a/magenta-lib/src/test/scala/magenta/deployment_type/AutoScalingTest.scala b/magenta-lib/src/test/scala/magenta/deployment_type/AutoScalingTest.scala index e6a304ec9..04adfe4da 100644 --- a/magenta-lib/src/test/scala/magenta/deployment_type/AutoScalingTest.scala +++ b/magenta-lib/src/test/scala/magenta/deployment_type/AutoScalingTest.scala @@ -142,8 +142,8 @@ class AutoScalingTest WaitForStabilization(testInfo, 15 * 60 * 1000, Region("eu-west-1")), CullInstancesWithTerminationTag(testInfo, Region("eu-west-1")), TerminationGrace(testInfo, Region("eu-west-1"), 10000), - WaitForStabilization(testInfo, 15 * 60 * 1000, Region("eu-west-1")), - ResumeAlarmNotifications(testInfo, Region("eu-west-1")) + ResumeAlarmNotifications(testInfo, Region("eu-west-1")), + WaitForStabilization(testInfo, 15 * 60 * 1000, Region("eu-west-1")) ) actual shouldBe expected } @@ -209,12 +209,12 @@ class AutoScalingTest ), CullInstancesWithTerminationTag(testOldCfnAsg, Region("eu-west-1")), TerminationGrace(testOldCfnAsg, Region("eu-west-1"), 10000), + ResumeAlarmNotifications(testOldCfnAsg, Region("eu-west-1")), WaitForStabilization( testOldCfnAsg, 15 * 60 * 1000, Region("eu-west-1") ), - ResumeAlarmNotifications(testOldCfnAsg, Region("eu-west-1")), // All tasks for testNewCdkAsg WaitForStabilization(testNewCdkAsg, 5 * 60 * 1000, Region("eu-west-1")), CheckGroupSize(testNewCdkAsg, Region("eu-west-1")), @@ -239,12 +239,12 @@ class AutoScalingTest ), CullInstancesWithTerminationTag(testNewCdkAsg, Region("eu-west-1")), TerminationGrace(testNewCdkAsg, Region("eu-west-1"), 10000), + ResumeAlarmNotifications(testNewCdkAsg, Region("eu-west-1")), WaitForStabilization( testNewCdkAsg, 15 * 60 * 1000, Region("eu-west-1") - ), - ResumeAlarmNotifications(testNewCdkAsg, Region("eu-west-1")) + ) ) actual shouldBe expected } @@ -334,8 +334,8 @@ class AutoScalingTest WaitForStabilization(testInfo, 3 * 60 * 1000, Region("eu-west-1")), CullInstancesWithTerminationTag(testInfo, Region("eu-west-1")), TerminationGrace(testInfo, Region("eu-west-1"), 11000), - WaitForStabilization(testInfo, 3 * 60 * 1000, Region("eu-west-1")), - ResumeAlarmNotifications(testInfo, Region("eu-west-1")) + ResumeAlarmNotifications(testInfo, Region("eu-west-1")), + WaitForStabilization(testInfo, 3 * 60 * 1000, Region("eu-west-1")) ) actual shouldBe expected }