Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: ManualSchedulerBuilder Does Not Use Provided Scheduler Listeners #532

Open
EarthCitizen opened this issue Aug 29, 2024 · 0 comments
Open

Comments

@EarthCitizen
Copy link

EarthCitizen commented Aug 29, 2024

Expected Behavior

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
@EarthCitizen EarthCitizen changed the title ManualSchedulerBuilder Does Not Use Provided Scheduler Listeners BUG: ManualSchedulerBuilder Does Not Use Provided Scheduler Listeners Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant