Fix flaky lambda concurrency test #9180
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
A flaky Lambda test occasionally blocks the pipeline.
Thank you @bentsku for raising this https://localstack-cloud.slack.com/archives/C02U7DN1B4M/p1695076802171769
Changes
Discussion
a) The safest fix is to increase ReservedConcurrentExecutions=3 but then we only occasionally test the border case.
b) We could slow down the test and use sleeps to have a high likelyhood of succeeding
c) We separate the mixed async/sync invoke into a separate test case (or after asserting the logs).