Skip to content

[improve](test)Using Awaitility instead of Thread.sleep (#37812)#38108

Merged
yiguolei merged 1 commit into
apache:branch-2.1from
CalvinKirs:branch-2.1-37812
Jul 19, 2024
Merged

[improve](test)Using Awaitility instead of Thread.sleep (#37812)#38108
yiguolei merged 1 commit into
apache:branch-2.1from
CalvinKirs:branch-2.1-37812

Conversation

@CalvinKirs
Copy link
Copy Markdown
Member

@CalvinKirs CalvinKirs commented Jul 19, 2024

Proposed changes

Awaitility: Waits until a specific condition is met, which makes the tests more reliable and less prone to intermittent failures. It ensures that the test only proceeds when the expected condition is true. Thread.sleep: Introduces a fixed delay, which can lead to flaky tests. If the condition is met sooner than the sleep time, the test unnecessarily waits. Conversely, if the condition is met after the sleep time, the test will fail.

(cherry picked from commit 8d249a2)

Proposed changes

Issue Number: close #37812

## Proposed changes

Awaitility: Waits until a specific condition is met, which makes the
tests more reliable and less prone to intermittent failures. It ensures
that the test only proceeds when the expected condition is true.
Thread.sleep: Introduces a fixed delay, which can lead to flaky tests.
If the condition is met sooner than the sleep time, the test
unnecessarily waits. Conversely, if the condition is met after the sleep
time, the test will fail.

(cherry picked from commit 8d249a2)
@doris-robot
Copy link
Copy Markdown

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@CalvinKirs
Copy link
Copy Markdown
Member Author

run buildall

@yiguolei yiguolei merged commit d4d1688 into apache:branch-2.1 Jul 19, 2024
@CalvinKirs CalvinKirs deleted the branch-2.1-37812 branch July 19, 2024 07:32
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

Successfully merging this pull request may close these issues.

3 participants