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

test(multichain-testing): stir for no AVA timeout in long awaits #10234

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michaelfig
Copy link
Member

@michaelfig michaelfig commented Oct 7, 2024

refs: #9934

Description

Reviewing the fact that AVA's "default timeout is 10 seconds", if no assertions are made during that timeout, AVA fails the test. The multichain-testing tests encounter this timeout when performing long awaits, notable during sleeps or during waiting for retry conditions that may take a long time.

Rather than attempting to solve this flake by trial-and-error moving AVA's timeout setting until the tests pass, this PR allows the long awaits (sleep, delay, and retryUntilCondition's operation) to "stir". That is, the test itself can specify a callback that will be invoked periodically when in a long "safe" await (that is, the await will already throw properly if there is an encountered problem, and the AVA assertion timeout just gets in the way). If the stir callback contains a trivial AVA assertion, that will reset AVA's internal assertion clock to postpone failure by timeout.

Security Considerations

n/a

Scaling Considerations

n/a

Documentation Considerations

n/a

Testing Considerations

A simple test of stirring while sleeping past the AVA timeout shows that this feature works. If this also helps avoid #9934, we should see fewer reports of flaky multichain-e2e tests.

Upgrade Considerations

n/a

@michaelfig michaelfig added tooling repo-wide infrastructure force:integration Force integration tests to run on PR labels Oct 7, 2024
@michaelfig michaelfig self-assigned this Oct 7, 2024
Copy link

cloudflare-workers-and-pages bot commented Oct 7, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 299e77c
Status: ✅  Deploy successful!
Preview URL: https://46ad6671.agoric-sdk.pages.dev
Branch Preview URL: https://mfig-9934-timeout-flakes.agoric-sdk.pages.dev

View logs

@michaelfig michaelfig force-pushed the mfig-9934-timeout-flakes branch 4 times, most recently from 6b38ae8 to bab5a04 Compare October 8, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force:integration Force integration tests to run on PR tooling repo-wide infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant