You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Rishabh Daim (Jira)" <ji...@apache.org> on 2026/07/06 15:41:00 UTC
[jira] [Created] (OAK-12300) ServiceListener not removed from BundleContext in awaitServiceEvent
Rishabh Daim created OAK-12300:
----------------------------------
Summary: 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
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]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)