-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Team reported issues running the GitHub runner, including test failures in the Anchor project. The team investigated the issues, including potential race conditions, and identified a solution involving waiting for one Solana slot to elapse before running the tests.
described test failures in the Anchor project, including invalid account data errors
We thought the issue could be a race condition, where the tests are starting too quickly before the Solana program is fully deployed but we tried adding a delay to the tests, and it did not resolve the issue.
However, Robert mentioned it works if you add await new Promise(res => setTimeout(res, 500)); to the top of the tests.
startup_wait is the maximum amount of time Anchor will wait for the [validator to startup] this isn’t relevant because our issue is after validator startup, we need one slot to elapse before the program can be callable.
We think the long-term solution is to wait for one slot to elapse before returning from start_test_validator.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status