@@ -908,6 +908,8 @@ func TestMonitor_InstanceNotManaged(t *testing.T) {
908908}
909909
910910func TestSendHeartbeats_EarlyClosure (t * testing.T ) {
911+ h .HeartbeatCallCount = 0
912+
911913 asgMock := h.MockedASG {
912914 RecordLifecycleActionHeartbeatResp : autoscaling.RecordLifecycleActionHeartbeatOutput {},
913915 RecordLifecycleActionHeartbeatErr : nil ,
@@ -937,6 +939,8 @@ func TestSendHeartbeats_EarlyClosure(t *testing.T) {
937939}
938940
939941func TestSendHeartbeats_NormalClosure (t * testing.T ) {
942+ h .HeartbeatCallCount = 0
943+
940944 asgMock := h.MockedASG {
941945 RecordLifecycleActionHeartbeatResp : autoscaling.RecordLifecycleActionHeartbeatOutput {},
942946 RecordLifecycleActionHeartbeatErr : nil ,
@@ -966,6 +970,8 @@ func TestSendHeartbeats_NormalClosure(t *testing.T) {
966970}
967971
968972func TestSendHeartbeats_ErrThrottlingASG (t * testing.T ) {
973+ h .HeartbeatCallCount = 0
974+
969975 asgMock := h.MockedASG {
970976 RecordLifecycleActionHeartbeatResp : autoscaling.RecordLifecycleActionHeartbeatOutput {},
971977 RecordLifecycleActionHeartbeatErr : awserr .New ("ThrottlingException" , "Rate exceeded" , nil ),
@@ -995,6 +1001,8 @@ func TestSendHeartbeats_ErrThrottlingASG(t *testing.T) {
9951001}
9961002
9971003func TestSendHeartbeats_ErrInvalidTarget (t * testing.T ) {
1004+ h .HeartbeatCallCount = 0
1005+
9981006 asgMock := h.MockedASG {
9991007 RecordLifecycleActionHeartbeatResp : autoscaling.RecordLifecycleActionHeartbeatOutput {},
10001008 RecordLifecycleActionHeartbeatErr : awserr .New ("ValidationError" , "No active Lifecycle Action found" , nil ),
0 commit comments