Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The validation assertion can pass on the old page’s existing last-name error, so the test must wait for the submitted form to become stale to resolve the invalid-then-valid submission race.
1 open issue
What changed in this PR
This PR addresses the Firefox flakiness reported in #55172 by tightening synchronization in the profile-validation test and the shared OAuth callback wait.
Changes:
- Adds a last-name validation-error assertion before resubmitting the profile form.
- Matches complete
codeanderrorparameter names sosession_codedoes not trigger the callback wait.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/forms/VerifyProfileTest.java |
Checks for a validation error before the valid submission. |
test-framework/ui/src/main/java/org/keycloak/testframework/ui/webdriver/WaitUtils.java |
Tightens OAuth callback parameter matching. |
Review effort: Balanced
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.actions.TermsAndConditionsTest#termsAcceptedKeycloak CI - Forms IT (firefox) |
Closes keycloak#55172 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
839b180 to
e9a6c2b
Compare
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#employeeSigPostNoIdpKeyTestCertSubjectAsKeyNameInKeyInfo |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>

Closes #55172
The failure had two independent causes, so both are fixed here: the test submitted again before the first invalid submit had finished rendering, and the shared OAuth callback wait matched
session_code=as if it werecode=.Decisions and assumptions
WaitUtilsnow matches whole parameter names (?,&or#followed bycode=orerror=). This changes behavior for all tests callingparseLoginResponse(), which I assume is intended, as the old match could only succeed early by accident.assertCurrent(), to keep the change small. Waiting for the error alone is not enough, as the initial page already shows a last name error. Other tests with an invalid-then-valid submit sequence may have the same race.release/26.8is the only supported branch with the migrated test and the faulty wait, so only that backport is needed.