Skip to content

Fix flaky tests using Awaitility.await().untilAsserted()#6171

Merged
trustin merged 1 commit intoline:mainfrom
kwondh5217:gh-6149
Mar 25, 2025
Merged

Fix flaky tests using Awaitility.await().untilAsserted()#6171
trustin merged 1 commit intoline:mainfrom
kwondh5217:gh-6149

Conversation

@kwondh5217
Copy link
Copy Markdown
Contributor

Motivation:

The test failure in #6149 occurs because the assertion was executed before the CompletableFuture was completed. This caused intermittent test failures when the test attempted to check the completion status too early.

Modifications:

  • Replaced direct assertions using assertThat() with await().untilAsserted() to properly wait for asynchronous operations to complete before asserting their results.

  • Applied the same fix to all test cases where the completion state of CompletableFuture was verified to ensure consistency and reliability.

Result:

Signed-off-by: Daeho Kwon <trewq231@naver.com>
Copy link
Copy Markdown
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙇

@trustin trustin added this to the 1.33.0 milestone Mar 24, 2025
@trustin trustin merged commit d6eccb5 into line:main Mar 25, 2025
14 checks passed
@trustin
Copy link
Copy Markdown
Member

trustin commented Mar 25, 2025

Thanks, @kwondh5217!

@kwondh5217
Copy link
Copy Markdown
Contributor Author

Thanks for merging the PR, @trustin ! I appreciate it!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure: com.linecorp.armeria.common.multipart.MultipartDecoderTest.[1] subscriberType=INFINITE

3 participants