Skip to content

Commit

Permalink
ELBv2: Workaround botocore bug for Delete-LB waiter (#8118)
Browse files Browse the repository at this point in the history
  • Loading branch information
bblommers authored Sep 11, 2024
1 parent 255d2b8 commit fd851c6
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions tests/test_elbv2/test_elbv2_target_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import boto3
import pytest
from botocore.exceptions import WaiterError

from . import elbv2_aws_verified

Expand Down Expand Up @@ -313,8 +314,13 @@ def test_register_targets(target_is_aws=False):

if load_balancer_arn:
conn.delete_load_balancer(LoadBalancerArn=load_balancer_arn)
waiter = conn.get_waiter("load_balancers_deleted")
waiter.wait(LoadBalancerArns=[load_balancer_arn])
try:
waiter = conn.get_waiter("load_balancers_deleted")
waiter.wait(LoadBalancerArns=[load_balancer_arn])
except WaiterError:
# This operations fails against botocore 1.35.15 and up
# https://github.com/boto/botocore/issues/3252
pass

if target_is_aws:
# Resources take a while to deregister
Expand Down Expand Up @@ -423,8 +429,13 @@ def test_describe_unknown_targets(target_is_aws=False):

if load_balancer_arn:
conn.delete_load_balancer(LoadBalancerArn=load_balancer_arn)
waiter = conn.get_waiter("load_balancers_deleted")
waiter.wait(LoadBalancerArns=[load_balancer_arn])
try:
waiter = conn.get_waiter("load_balancers_deleted")
waiter.wait(LoadBalancerArns=[load_balancer_arn])
except WaiterError:
# This operations fails against botocore 1.35.15 and up
# https://github.com/boto/botocore/issues/3252
pass

if target_is_aws:
# Resources take a while to deregister
Expand Down

0 comments on commit fd851c6

Please sign in to comment.