Skip to content

Conversation

@bkkothari2255
Copy link
Contributor

@bkkothari2255 bkkothari2255 commented Feb 1, 2026

Issue: SLING-13088

  • Migrated 8 test classes:
  1. ModelAdapterFactoryTest
  2. ModelAdapterFactory_ImplementationPickerOrderTest
  3. ModelAdapterFactory_InjectorOrderTest
  4. ModelPackageBundleListenerTest
  5. MultipleInjectorTest
  6. OSGiInjectionTest
  7. OptionalObjectsTest
  8. OptionalPrimitivesTest
  • Changes
    • Replaced MockitoJUnitRunner with @ExtendWith(MockitoExtension.class)
    • Converted @Test(expected) to assertThrows()
    • Switched to doReturn().when() to resolve generic type inference issues
    • Corrected assertion argument order (expected vs. actual)
    • Added <?> wildcards to raw Type variables to fix compiler warnings
    • Renamed shadowed local log variables to logger to avoid conflicts
    • Removed unnecessary eq() matchers and redundant throws declarations
    • Cleaned up @SuppressWarnings and resolved related Sonar issues
    • Applied lenient() strictness to preserve legacy behavior
    • Added JUnit 5 OSGi dependency for implementation picker & Injector order test

@bkkothari2255 bkkothari2255 force-pushed the feature/SLING-13088-migrate-models-osgi-ordering-root-tests-batch-3-junit5 branch from ea6dda5 to 87956e1 Compare February 6, 2026 00:07
Copy link
Member

@stefanseifert stefanseifert left a comment

Choose a reason for hiding this comment

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

great - thanks again for this PR for the migration.

please see my note regarding the IT fix, it should not be part of this PR, and is likely not fixing the root cause for the flakyness we have from time to time.

@bkkothari2255 bkkothari2255 force-pushed the feature/SLING-13088-migrate-models-osgi-ordering-root-tests-batch-3-junit5 branch from 87956e1 to e48025d Compare February 9, 2026 15:52
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@stefanseifert
Copy link
Member

thanks!

@stefanseifert stefanseifert merged commit 3ef0e23 into apache:master Feb 9, 2026
3 checks passed
@bkkothari2255 bkkothari2255 deleted the feature/SLING-13088-migrate-models-osgi-ordering-root-tests-batch-3-junit5 branch February 9, 2026 18:20
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.

2 participants