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

[UNIT-TEST] Use wait-until-${async-complete}-reaches DSL instead of sleep(n) to to reduce invalid wait time. #3741

Closed
Erik1288 opened this issue Jan 10, 2022 · 3 comments

Comments

@Erik1288
Copy link
Contributor

The issue tracker is ONLY used for bug report(feature request need to follow RIP process). Keep in mind, please check whether there is an existing same report before your raise a new one.

Alternately (especially if your communication is not a bug report), you can send mail to our mailing lists. We welcome any friendly suggestions, bug fixes, collaboration and other improvements.

Please ensure that your bug report is clear and that it is complete. Otherwise, we may be unable to understand it or to reproduce it, either of which would prevent us from fixing the bug. We strongly recommend the report(bug report or feature request) could include some hints as the following:
FEATURE REQUEST

  1. Please describe the feature you are requesting.

After we call an asynchronous method, subsequent tests require that the asynchronous operation has finished, usually using Thread.sleep() directly. In order to make sure that the asynchronous operation is complete, the sleep time has to be set very big. There is no need to wait so long. Therefore, wait-until-XXX-reaches is a good method to avoid busyness.

  1. Provide any additional detail on your proposed use case for this feature.

Abstract wait-until-${async-complete}-reaches pattern for different tests.

  1. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?

  2. If there are some sub-tasks using -[] for each subtask and create a corresponding issue to map to the sub task:

It will be a long-term process.

@Erik1288 Erik1288 changed the title [UNIT-TEST] Use wait-until-xxx-reaches DSL instead of sleep(n) to to reduce invalid wait time. [UNIT-TEST] Use wait-until-${async-complete}-reaches DSL instead of sleep(n) to to reduce invalid wait time. Jan 10, 2022
@RongtongJin
Copy link
Contributor

Good catch!Could you submit a pull request to fix the issue?

@Erik1288
Copy link
Contributor Author

Good catch!Could you submit a pull request to fix the issue?
I'm working on it.

RongtongJin pushed a commit that referenced this issue Feb 9, 2022
@RongtongJin
Copy link
Contributor

Merged

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

No branches or pull requests

3 participants