Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integ tests should add retry loops for verifying async actions #33

Open
ghost opened this issue Oct 20, 2022 · 0 comments
Open

integ tests should add retry loops for verifying async actions #33

ghost opened this issue Oct 20, 2022 · 0 comments
Labels
good first issue Good for newcomers tech debt Tech debt to be addressed

Comments

@ghost
Copy link

ghost commented Oct 20, 2022

Some tests in these sample apps check for async action's effect. For example, in ts-events we call a method that kicks off an async process that sets a persisted map. Our test then calls a second method that checks the value of the map. This check should be in a retry loop, since there's no guarantee that the async process will be completed by the time the check happens.

Today, the integ test runner action in klothoplatform/klotho retries the whole test suite if it fails. We need this because of our Lambda cold-starts, which cause pretty much anything that's not fargate to fail the first time. As it happens, the "put" path always writes the same value, so this suite-wide retry works as the test-scoped retry: there's a good chance that the second run of the suite will work, not because the second "put" has completed yet, but because the second "get" sees the result of the first "put".

At some point, we'll fix the cold start issues, and then be able to remove the suite-wide retry. When that happens, any async action's verification may start failing. We should add retry for that verification, to get ahead of the problem.

@ghost ghost added good first issue Good for newcomers tech debt Tech debt to be addressed labels Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers tech debt Tech debt to be addressed
Projects
None yet
Development

No branches or pull requests

0 participants