Skip to content

Wait for AUTH_RESPONSE page in MultipleTabsLoginTest#51103

Open
rmartinc wants to merge 1 commit into
keycloak:mainfrom
rmartinc:issue-51076
Open

Wait for AUTH_RESPONSE page in MultipleTabsLoginTest#51103
rmartinc wants to merge 1 commit into
keycloak:mainfrom
rmartinc:issue-51076

Conversation

@rmartinc

Copy link
Copy Markdown
Contributor

Closes #51076
Closes #51075
Closes #51074
Closes #51073

Add a wait for the authentication response page. This was failing in several places in the MultipleTabsLoginTest. Don't know why this is happening now, probably some upgrade or similar. I have tested this locally and in the CI I executed both chrome and firefox 20 times each in https://github.com/rmartinc/keycloak/actions/runs/29931372085.

Closes keycloak#51076
Closes keycloak#51075
Closes keycloak#51074
Closes keycloak#51073

Signed-off-by: rmartinc <rmartinc@redhat.com>
Copilot AI review requested due to automatic review settings July 23, 2026 07:20
@rmartinc
rmartinc requested review from a team as code owners July 23, 2026 07:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Stabilizes multi-tab authentication tests by waiting for the client authentication response before parsing it.

Changes:

  • Waits for the AUTH_RESPONSE page in waitForAppPage.
  • Removes a redundant page-load wait.
  • Simplifies a refresh callback.

// error and being redirected to client
htmlUnitAction.run();
}
UIUtils.currentTitleEquals("AUTH_RESPONSE");

@gaoyikeshuer gaoyikeshuer Jul 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not a blocker, just noticed the currentTitleEquals method will return to boolean value and swallows the timeout exception. so its a wait rather than check. since we want to resolve the flaky issues, should we assert on the result with some message? LGTM otherwise also

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If it fails and returns false, we will get the error we are trying to fix. So I think that no issue. I just used this method to not create a new one that waits for the auth response page. Thanks!

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