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

Refactor polling methods in tests #859

Open
mkam opened this issue May 10, 2022 · 0 comments
Open

Refactor polling methods in tests #859

mkam opened this issue May 10, 2022 · 0 comments

Comments

@mkam
Copy link
Contributor

mkam commented May 10, 2022

Description

There are various "WaitFor" (WaitForEvent, WaitForTestReadiness, WaitForCatalogRegistration, etc.) methods that our tests use which poll an API until a certain condition is met. They mostly all follow a similar pattern and could be refactored to use common code for the polling setup. This would help reduce the bootstrap code needed to implement polling methods in the future.

Additional context

Noting some differences between the methods that may affect writing a common polling logic method.

  • Some methods can benefit from returning the resource they're polling
  • Some methods fail the test if the timeout is reached and some return an error
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