Skip to content

Commit 8f86972

Browse files
committed
Added exception for create_log_stream in test module
1 parent 9bcfb3b commit 8f86972

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_cloudwatch.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ def test_describe_log_streams_and_filter_log_events(loggroup):
6161
"aws_sdk_pandas_log_stream_four",
6262
]
6363
for log_stream in log_stream_names:
64-
cloudwatch_log_client.create_log_stream(logGroupName=loggroup, logStreamName=log_stream)
64+
try:
65+
cloudwatch_log_client.create_log_stream(logGroupName=loggroup, logStreamName=log_stream)
66+
except cloudwatch_log_client.Client.exceptions.ResourceAlreadyExistsException:
67+
continue
6568
log_streams_df = wr.cloudwatch.describe_log_streams(
6669
log_group_name=loggroup, order_by="LastEventTime", descending=False
6770
)

0 commit comments

Comments
 (0)