Skip to content

Flaky test: OrganizationSharedIdpBrokerTest is not redirected to the provider realm on Chrome #55243

Description

@ahus1

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

organizations

Bug Description

On headless Chrome, four tests of OrganizationSharedIdpBrokerTest fail together in some runs and pass in others, with the same command and the same code. After loginUsernamePage.submit() the browser stays on the consumer realm's username form, and the username field is empty, instead of being redirected to the provider realm. Waiting up to five seconds for the redirect, or waiting for the username page before typing, does not change the outcome, so this is not a submit-before-navigation race. The root cause is not yet known.

On Firefox, testAuthNotePreservedOverridesEmailDomain additionally reads the page source of the update profile page while the new document is still loading. This is addressed by #55173.

Version

nightly

Regression

  • The issue is a regression

Expected behavior

The tests pass reliably.

Actual behavior

OrganizationSharedIdpBrokerTest.testSharedIdpResolvesOrgFromEmailDomain:96 Should be redirected to provider realm, but the URL is http://localhost:8080/realms/consumer/protocol/openid-connect/auth?...
OrganizationSharedIdpBrokerTest.testAuthNotePreservedOverridesEmailDomain:154 Should be redirected to provider realm via org-B's domain routing
OrganizationSharedIdpBrokerTest.testMultipleDomainsMixedFederationRouting:371 alice should be redirected to provider realm via IdP-X
OrganizationSharedIdpBrokerTest.testWildcardDomainWithSpecificOverride:320 Should be redirected to provider realm via IdP-X

How to Reproduce?

Run ./mvnw package -f tests/pom.xml -Dkc.test.browser=chrome-headless -Dtest='OrganizationSharedIdpBrokerTest' a few times. In my runs, four tests failed in most runs, and all six passed in some runs.

Anything else?

OrganizationSharedIdpBrokerTest exists on release/26.8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for bug.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions