Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ def create_stream(self, stream_name):
if i == retries - 1:
logging.error('Could not create kinesis stream')
raise e
# LocalStack's HTTP endpoint may not be ready to accept connections
# immediately after container startup; sleep before retrying so all
# attempts are not exhausted immediately on ConnectionClosedError.
time.sleep(3)

# Wait for the stream to be active
self.get_first_shard_id(stream_name)
Expand Down
4 changes: 4 additions & 0 deletions sdks/python/apache_beam/yaml/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,10 @@ def _create_kinesis_stream(kinesis_client, stream_name):
if attempt == retries - 1:
_LOGGER.error('Could not create kinesis stream')
raise exn
# LocalStack's HTTP endpoint may not be ready to accept connections
# immediately after container startup; sleep before retrying so all
# attempts are not exhausted immediately on ConnectionClosedError.
time.sleep(3)

for attempt in range(retries):
stream = kinesis_client.describe_stream(StreamName=stream_name)
Expand Down
Loading