This is an automated email from the ASF dual-hosted git repository.

joerghoh pushed a commit to branch SLING-13393
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-i18n.git

commit 6f1a631fe60efa4bab1fb016ce8e7c9a948d81c9
Author: Joerg Hoh <[email protected]>
AuthorDate: Wed Oct 14 23:06:45 2026 +0200

    SLING-13393 add test description
---
 .../impl/ConcurrentJcrResourceBundleLoadingTest.java  | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git 
a/src/test/java/org/apache/sling/i18n/impl/ConcurrentJcrResourceBundleLoadingTest.java
 
b/src/test/java/org/apache/sling/i18n/impl/ConcurrentJcrResourceBundleLoadingTest.java
index 90fba1a..e8405ea 100644
--- 
a/src/test/java/org/apache/sling/i18n/impl/ConcurrentJcrResourceBundleLoadingTest.java
+++ 
b/src/test/java/org/apache/sling/i18n/impl/ConcurrentJcrResourceBundleLoadingTest.java
@@ -341,7 +341,8 @@ public class ConcurrentJcrResourceBundleLoadingTest {
     }
 
     /**
-     * Verify that no exception occurs if requests come in during deactivate
+     * Pauses a lookup before repository loading, then deactivates the 
provider.
+     * The lookup may complete, but neither it nor a later lookup may leave a 
service registered.
      */
     @Test
     public void loadBundlesDuringDeactivateRace() throws Exception {
@@ -370,11 +371,19 @@ public class ConcurrentJcrResourceBundleLoadingTest {
         }
     }
 
+    /**
+     * Deactivates while a new service's registration callback is blocked, 
before
+     * registry publication. The completed lookup must leave no registered 
service.
+     */
     @Test
     public void registrationDuringDeactivateDoesNotLeaveServices() throws 
Exception {
         assertRegistrationDuringDeactivate(false);
     }
 
+    /**
+     * Deactivates while a replacement's registration callback is blocked.
+     * Both the original and replacement services must be unregistered exactly 
once.
+     */
     @Test
     public void replacementDuringDeactivateDoesNotLeaveServices() throws 
Exception {
         assertRegistrationDuringDeactivate(true);
@@ -420,6 +429,10 @@ public class ConcurrentJcrResourceBundleLoadingTest {
         }
     }
 
+    /**
+     * Triggers deactivation synchronously from a registration listener.
+     * Reentrant closure must prevent the returning registration from leaking 
a service.
+     */
     @Test
     public void deactivateFromRegistrationCallbackDoesNotLeaveServices() 
throws Exception {
         ServiceListener listener = event -> {
@@ -436,6 +449,10 @@ public class ConcurrentJcrResourceBundleLoadingTest {
         }
     }
 
+    /**
+     * Pauses retirement of the original service while deactivation cleans up 
the
+     * registry. Overlapping reload and shutdown must unregister each service 
exactly once.
+     */
     @Test
     public void 
replacementRetirementDuringDeactivateUnregistersEachServiceOnce() throws 
Exception {
         provider.getResourceBundle(Locale.ENGLISH);

Reply via email to