File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
mismi-autoscaling/test/Test/IO/Mismi/Autoscaling Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,16 @@ prop_scale_in_invalid_state = once . testGroup $ \c g -> do
104104 conf <- conf' c
105105 createConfiguration conf
106106 createGroup $ group' c g 1
107- -- Allow ec2 instance to partially start up
108- liftIO . snooze $ seconds 10
109- d <- describeOrFail g
110- let is = scalingInstanceId <$> groupResultInstances d
107+
108+ let retryX action =
109+ retrying
110+ (constantDelay 2000000 <> limitRetries 20 ) {- 2 seconds -}
111+ (const $ return . null )
112+ (const action)
113+
114+ is <- retryX $ (fmap scalingInstanceId . groupResultInstances) <$> describeOrFail g
111115 r <- runEitherT $ lockInstances g is
112- pure $ r === Left InstanceProtectionInvalidState
116+ pure $ (r, length is) === ( Left InstanceProtectionInvalidState , 1 )
113117
114118prop_scale_in = once . testGroup $ \ c g -> do
115119 conf <- conf' c
You can’t perform that action at this time.
0 commit comments