harden test_dynamodb_stream_records_with_update_item #11094
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Following up another test failure in https://app.circleci.com/pipelines/github/localstack/localstack/26140/workflows/8cc6ef1b-70fd-4e35-bea3-77ff3637a2db/jobs/221443/tests
And follow up from #10973 which was unsuccessful at fixing the test as it didn't tackle the proper origin of the problem.
I've tried to harden the test to be more resilient. It seems the flake came from the fact that we would try to fetch the records, and if there weren't enough in the kinesis stream, we would fetch again and extend the already existing list of records with newly fetched records, leading to duplicate items (we can see the two
INSERT
events have the sameSequenceNumber
Changes
\cc @alexrashed