joerghoh commented on code in PR #55:
URL: 
https://github.com/apache/sling-org-apache-sling-event/pull/55#discussion_r3451715777


##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -357,6 +363,10 @@ protected void deactivate() {
             this.startupDelayListener.dispose();
             this.startupDelayListener = null;
         }
+        final ScheduledExecutorService s = this.scheduler.getAndSet(null);
+        if (s != null) {

Review Comment:
   Can you add a brief comment, that this does only apply to tests?



##########
src/test/java/org/apache/sling/event/impl/jobs/config/JobManagerConfigurationTest.java:
##########
@@ -84,15 +84,17 @@ public void configurationChanged(boolean active) {
         }
     }
 
-    @Test
-    public void testTopologyChange() throws Exception {
-        // mock scheduler
-        final ChangeListener ccl = new ChangeListener();
+    @SuppressWarnings("unchecked")
+    private static void setScheduler(JobManagerConfiguration config, 
java.util.concurrent.ScheduledExecutorService s) {
+        
((java.util.concurrent.atomic.AtomicReference<java.util.concurrent.ScheduledExecutorService>)

Review Comment:
   A package-level setter would probably be easier to use than reflection.
   



-- 
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]

Reply via email to