joerghoh commented on code in PR #55:
URL:
https://github.com/apache/sling-org-apache-sling-event/pull/55#discussion_r3085825908
##########
src/test/java/org/apache/sling/event/impl/jobs/config/JobManagerConfigurationTest.java:
##########
@@ -84,15 +88,173 @@ public void configurationChanged(boolean active) {
}
}
- @Test
- public void testTopologyChange() throws Exception {
- // mock scheduler
- final ChangeListener ccl = new ChangeListener();
+ /**
+ * A ScheduledExecutorService that captures submitted tasks without
executing them.
+ * Models realistic shutdown semantics: {@link #shutdownNow()} marks the
scheduler as shut down
+ * and clears pending tasks; {@link #schedule} after shutdown throws
{@link RejectedExecutionException};
+ * {@link #runAll()} skips execution after shutdown.
+ */
+ private static class ManualScheduler implements ScheduledExecutorService {
Review Comment:
I would externalize this internal class into a dedicated class.
--
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]