Skip to content

Conversation

@kabo87777
Copy link

@kabo87777 kabo87777 commented Oct 1, 2025

Q A
Fixed Issues? Fixes #2989
Patch: Bug Fix? Yes
Minor: New Feature?
Major: Breaking Change?
Tests Added + Pass? Yes
Documentation Provided Yes (code comments and or markdown)
Any Dependency Changes?
License Apache License, Version 2.0

Fix ID(Implementation-dependent) tests in DefaultPathProcessorTest

Solution

For testVanityUrl:

  • Added explicit check for Externalizer service availability before component registration
  • Implemented fallback mock registration to ensure dependency is always satisfied
  • Maintains original test logic while eliminating timing dependencies

For testVanityConfig:

  • Replaced non-deterministic assertions with controlled mock ResourceResolver instances
  • Eliminated dependency on CoreComponentTestContext mapping order
  • Used explicit mocking to ensure predictable test outcomes

Verification

  • NonDex testing: All seeds now pass consistently (previously failed on 2/3 seeds)
  • Functional equivalence: Tests verify the same behavior with deterministic setup
  • No regressions: All existing test functionality preserved

This fix ensures the test suite remains robust and reliable, supporting the overall quality of the AEM Core Components project.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 1, 2025

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DefaultPathProcessor] Implementation-dependent tests in testVanityUrl and testVanityConfig

1 participant