[
https://issues.apache.org/jira/browse/OAK-12300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rishabh Daim updated OAK-12300:
-------------------------------
Description:
h3. Summary
ServiceListener is not removed from BundleContext after awaitServiceEvent
completes, causing resource leaks and test interference across test runs in
oak-pojosr.
h3. Problem
The EventServiceListener in AbstractRepositoryFactoryTest was added to
BundleContext but never removed after awaitServiceEvent() completed (either
successfully or via timeout). This caused:
* Resource leak - listeners accumulated across test runs
* Test interference - listeners from previous tests continued receiving
service events
* Intermittent test failures - unrelated service events could be captured,
causing timeout errors when waiting for specific SecurityProvider registration
events
was:
h3. Summary
ServiceListener is not removed from BundleContext after awaitServiceEvent
completes, causing resource leaks and test interference across test runs in
oak-pojosr.
h3. Problem
The EventServiceListener in AbstractRepositoryFactoryTest was added to
BundleContext but never removed after awaitServiceEvent() completed (either
successfully or via timeout). This caused:
* Resource leak - listeners accumulated across test runs
* Test interference - listeners from previous tests continued receiving service
events
* Intermittent test failures - unrelated service events could be captured,
causing timeout errors when waiting for specific SecurityProvider registration
events
h3. Example
The failing test
SecurityProviderRegistrationTest.testRequiredTokenConfigurationNotAvailable
would timeout waiting for a REGISTERED event, but instead received unrelated
service events (LoginModuleStats MBean registration) from other components,
causing the assertion to fail.
h3. Technical Details
See wiki for implementation details:
[ServiceListener Cleanup Fix|https://github.com/apache/jackrabbit-oak]
> ServiceListener not removed from BundleContext in awaitServiceEvent
> -------------------------------------------------------------------
>
> Key: OAK-12300
> URL: https://issues.apache.org/jira/browse/OAK-12300
> Project: Jackrabbit Oak
> Issue Type: Bug
> Reporter: Rishabh Daim
> Assignee: Rishabh Daim
> Priority: Major
>
> h3. Summary
> ServiceListener is not removed from BundleContext after awaitServiceEvent
> completes, causing resource leaks and test interference across test runs in
> oak-pojosr.
> h3. Problem
> The EventServiceListener in AbstractRepositoryFactoryTest was added to
> BundleContext but never removed after awaitServiceEvent() completed (either
> successfully or via timeout). This caused:
> * Resource leak - listeners accumulated across test runs
> * Test interference - listeners from previous tests continued receiving
> service events
> * Intermittent test failures - unrelated service events could be captured,
> causing timeout errors when waiting for specific SecurityProvider
> registration events
--
This message was sent by Atlassian Jira
(v8.20.10#820010)