You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ManualSchedulerBuilder passes provided SchedulerListeners to the constructor of ManualBuilder.
Current Behavior
When calling .build() on ManualSchedulerBuilder, it does not pass the provided SchedulerListeners to the constructor. Instead, it passes in a hard-coded list that contains StatsRegistryAdapter.
The best way to do automated testing is to use ManualScheduler, but as a result of the above issue, it is not possible to take advantage of ScheduleListeners because they cannot be tested with ManualScheduler.
Additionally, trying to use ManualScheduler.registerSchedulerListener() results in an unsupported operation exception because the unlying list is unmodifiable.
Also cannot bypass constructor and create my own ManualScheduler because its constructor is package private.
Currently having to resort to some reflection to add the listeners.
Context
DB-Scheduler Version : 14.1.0
Java Version : 17
Spring Boot (check for Yes) : [ X]
Database and Version : N/A
The text was updated successfully, but these errors were encountered:
EarthCitizen
changed the title
ManualSchedulerBuilder Does Not Use Provided Scheduler Listeners
BUG: ManualSchedulerBuilder Does Not Use Provided Scheduler Listeners
Aug 29, 2024
Expected Behavior
ManualSchedulerBuilder
passes providedSchedulerListener
s to the constructor ofManualBuilder
.Current Behavior
When calling
.build()
onManualSchedulerBuilder
, it does not pass the providedSchedulerListener
s to the constructor. Instead, it passes in a hard-coded list that containsStatsRegistryAdapter
.The best way to do automated testing is to use
ManualScheduler
, but as a result of the above issue, it is not possible to take advantage ofScheduleListener
s because they cannot be tested withManualScheduler
.Additionally, trying to use
ManualScheduler.registerSchedulerListener()
results in an unsupported operation exception because the unlying list is unmodifiable.Also cannot bypass constructor and create my own
ManualScheduler
because its constructor is package private.Currently having to resort to some reflection to add the listeners.
Context
The text was updated successfully, but these errors were encountered: