rishabhdaim opened a new pull request, #3005: URL: https://github.com/apache/jackrabbit-oak/pull/3005
## Problem The EventServiceListener in AbstractRepositoryFactoryTest was added to BundleContext but never removed after awaitServiceEvent() completed (either successfully or via timeout). ### Impact - Resource leak - listeners accumulated across test runs - Test interference - listeners from previous tests continued receiving service events - Intermittent test failures - unrelated service events caused timeout errors when waiting for specific SecurityProvider registration events Example: SecurityProviderRegistrationTest.testRequiredTokenConfigurationNotAvailable would timeout waiting for a REGISTERED event, but instead received unrelated service events (LoginModuleStats MBean registration). ## Solution Added try-finally block to ensure `bundleContext.removeServiceListener(listener)` is always called after the await completes, preventing listener accumulation and cross-test event interference. ## Testing - All 11 tests in SecurityProviderRegistrationTest pass - All 40 tests in oak-pojosr module pass - Ran the specific failing test 5 times in succession - all passed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
