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

Not depend on timeouts for async testing flows #271

Open
adzialocha opened this issue Jan 25, 2023 · 1 comment
Open

Not depend on timeouts for async testing flows #271

adzialocha opened this issue Jan 25, 2023 · 1 comment

Comments

@adzialocha
Copy link
Member

Currently we use simple timeouts to wait for certain conditions to arrive before we continue with our tests (for example a schema has been built / registered, a new dynamic GraphQL API established, a document was materialized etc.). We should have a more reliable and programmatic wait to really tell that the work was done, otherwise we might end up with long waiting times or race conditions where the tests will sometimes fail.

Related PR: #266

@adzialocha
Copy link
Member Author

Another pattern to use here which would not involve extending our API with test utilities is to write a helper which waits for a condition to arrive within the test, including a timeout which makes the test fail if that condition did not arrive in x seconds. Maybe there's already a crate for that ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant