fix: moving waiting into the assertMessage method#51096
Conversation
There was a problem hiding this comment.
Pull request overview
Centralizes waiting for asynchronous CLI output and improves process stream handling.
Changes:
- Reads stdout and stderr concurrently using UTF-8.
- Adds Awaitility-based positive output assertions.
- Simplifies logging tests to use
CLIResult.assertMessage.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
RawKeycloakDistribution.java |
Concurrently captures process output. |
CLIResult.java |
Adds output-aware assertion waiting. |
LoggingDistTest.java |
Removes redundant explicit waits. |
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.adapter.servlet.SAMLServletAdapterTest#employeeSigPostNoIdpKeyTestNoKeyNameInKeyInfoKeycloak CI - Adapter IT Strict Cookies |
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsParallelLoginTestWithAuthSessionExpiredAndRegisterClickKeycloak CI - Forms IT (chrome) |
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.forms.MultipleTabsLoginTest#multipleTabsParallelLoginTestWithAuthSessionExpiredAndRegisterClickKeycloak CI - Forms IT (firefox) |
also making output reading more fool-proof close: keycloak#51070 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Awaitability was being used inconsistently around assertMessage calls, so it seems better to just embed the waiting in the CLIResult logic.
also making output reading more fool-proof
Based upon the copilot comments, it will also address flakyness such as https://github.com/keycloak/keycloak/actions/runs/29988894966/job/89147575751?pr=50324#step:5:3799
close: #51070