asgard icon indicating copy to clipboard operation
asgard copied to clipboard

Flaky test in DeploymentWorkflowSpec

Open holmesjr opened this issue 9 years ago • 0 comments

The test "should not rollback if previous ASG has disappeared" in DeploymentWorkflowSpec seems to be flaky. Something in the interaction of the mock throwing the exception:

then: 1 * mockActivities.reasonAsgIsNotOperational(userContext, 'the_seaward-v003', 1) >> {
            throw new IllegalStateException('Something really went wrong!')
        }

and the code in DeploymentWorkflowImpl at scaleAsg():

DoTry<Void> asgIsOperational = doTry {
            retry(retryPolicy) {
                waitFor(activities.reasonAsgIsNotOperational(userContext, asgName, capacity)) { String reason ->
                    if (reason) {
                        throw new PushException(reason)
                    }
                    Promise.Void()
                }
            }
        }

causes the test to hang on some occasions at line 232:

waitFor(anyPromises(startupTimeout.result, asgIsOperational.result)) {...

Sometimes the test passes fine. We see this pass/fail behaviour in subsequent runs of the test.

holmesjr avatar Mar 06 '15 05:03 holmesjr