[Feature] Optimize the wait functions in E2E tests #609
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
Currently, we use
time.sleep()
to wait for the system convergence in E2E tests. However,time.sleep()
will block the process for fixed units of time. Hence, we need to use new wait functions that block the process only when the system is not ready.kind create cluster --wait ...
(Link)kubectl wait
(Link)Result
Without this PR
![Screen Shot 2022-09-30 at 3 18 03 PM](https://user-images.githubusercontent.com/20109646/193363946-41d63201-5549-454d-8c59-5f354538bf0d.png)
With this PR
![Screen Shot 2022-09-30 at 3 17 45 PM](https://user-images.githubusercontent.com/20109646/193363972-c17db4ef-291e-48d1-acb9-e6d08cf2d740.png)
Related issue number
Closes #611
Checks