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

Fix: Cycle time change from wait for trigger to actual time #2790

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

parapluplu
Copy link
Contributor

If the config was changed from AbstractWorker.ALWAYS_WAIT_FOR_TRIGGER_NEXT_RUN to a value >= 0 again the cycle thread remaind in a waiting state. The reason for that is that the thread was put in an await state as soon as AbstractWorker.ALWAYS_WAIT_FOR_TRIGGER_NEXT_RUN was configured.
This change allows a change at releases the thread again.

Testing: Unit tests, and the simulator app starts up and starts executing cycles

Note: The cycle worker implementation is using a stopwatch that does not allow to inject a custom clock. To improve unit tests, I can provide a pull request that refactors the stopwatch implementation first, if this change is wanted.

This change fixes an error that surfaces when using the SimulatorApp. The cycle never actually starts to execute.

@parapluplu parapluplu changed the title iFix: Cycle time change from wait for trigger to actual time Fix: Cycle time change from wait for trigger to actual time Sep 11, 2024
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ There is a different number of reports uploaded between BASE (d0ae040) and HEAD (e9902b1). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (d0ae040) HEAD (e9902b1)
java 1 0
Additional details and impacted files
@@              Coverage Diff               @@
##             develop    #2790       +/-   ##
==============================================
- Coverage      56.65%   25.85%   -30.80%     
==============================================
  Files           2167      262     -1905     
  Lines          91939     6682    -85257     
  Branches        6833     1026     -5807     
==============================================
- Hits           52081     1727    -50354     
+ Misses         37983     4876    -33107     
+ Partials        1875       79     -1796     

If the config was changed from `AbstractWorker.ALWAYS_WAIT_FOR_TRIGGER_NEXT_RUN` to a value >= 0 again the cycle thread remaind in a waiting state. The reason for that is that the thread was put in an await state as soon as `AbstractWorker.ALWAYS_WAIT_FOR_TRIGGER_NEXT_RUN` was configured.
This change allows a change at releases the thread again.

Testing: Unit tests, and the simulator app starts up and starts executing cycles
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

Successfully merging this pull request may close these issues.

1 participant