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
|
|
||
| verifyProfilePage.assertCurrent(); | ||
| // wait for the re-rendered page with the validation error before submitting again | ||
| assertNotNull(verifyProfilePage.getInputErrors().getLastNameError()); |
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 |

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. 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.