Skip to content

fix(1.13): stabilize security configuration manager test - #32848

Closed
yan-3005 wants to merge 2 commits into
1.13from
fix-1.13-security-config-test
Closed

yan-3005 wants to merge 2 commits into
1.13from
fix-1.13-security-config-test

Conversation

@yan-3005

@yan-3005 yan-3005 commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

This fixes a branch-level flaky service unit test exposed by #32373 and independently by #32590.

SamlAuthServletHandlerTest mutates the SecurityConfigurationManager singleton and can leave the authorizer configuration populated while the authentication configuration is null. testConfigGettersReturnNullWhenNotInitialized depended on ambient singleton state and assumed only two possible states: all configuration is null, or authentication and authorization are both populated. Surefire filesystem ordering can therefore make the test fail even though the PR under test did not touch this code.

The test now establishes its own uninitialized precondition by clearing authentication, authorization, and MCP configuration before asserting all three getters return null. There are no production-code changes.

Type of change:

  • Bug fix

Verification:

  • Reproduced on unmodified origin/1.13 with SamlAuthServletHandlerTest,SecurityConfigurationManagerTest: 31 tests, 1 failure.
  • Ran the same ordered test selection after the fix: 31 tests, 0 failures.
  • Ran mvn -pl openmetadata-service spotless:apply.
  • Ran mvn -pl openmetadata-service spotless:check.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have added a test fix that covers the exact scenario.
  • No schema or migration changes are required.

@yan-3005
yan-3005 requested a review from a team as a code owner September 7, 2026 09:28
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Sep 7, 2026
@yan-3005 yan-3005 added the skip-pr-checks Bypass PR metadata validation check label Sep 7, 2026
@gitar-bot

gitar-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes a flaky test in SecurityConfigurationManagerTest that depended on singleton state and filesystem ordering. The test now establishes its own uninitialized precondition by clearing all configuration before asserting getters return null. No production code changes; test verified stable after fix.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@yan-3005

yan-3005 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Fixed here #32590

@yan-3005 yan-3005 closed this Sep 7, 2026
auto-merge was automatically disabled September 7, 2026 11:45

Pull request was closed

This branch was previously deployed

1 inactive deployment
test — e61fb52c Deployed Sep 7, 2026 by yan-3005 via playwright-ci-postgresql (4, 6) #81161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants