New scheduler unit tests

Hy Murveit murveit at gmail.com
Thu Apr 22 07:37:23 BST 2021


Recently I proposed some small changes to the scheduler's altitude
constraints. Though I believe these were tactical and relatively safe, Eric
and Wolfgang (correctly) commented that the scheduler may be not
sufficiently tested to allow new features. I support this point-of-view,
that the scheduler needs improved testing, and I know they are working hard
to improve this situation.

To help address this need, I have put together MR
https://invent.kde.org/education/kstars/-/merge_requests/275 which is a
substantial start to Unit Testing the scheduler. This MR tests much of the
planning/scheduling part of the scheduler (though not the state-machine
control aspects). It tests creating, evaluating and scheduling sequences of
SchedulerJobs. It is not complete, but I believe it is a good start. I hope
it can bring us close to the point where we can once again improve some of
the scheduler functionality.

Please check it out. If you have more edge cases, feel free to let me know
and I can try and add them, or feel free to add them yourself after it is
submitted.

In order to create these unit tests, I needed to refactor some of the
scheduler, to separate the user interface and the state machine aspects of
the code from the scheduler's evaluation/planning/scheduling parts. *It was
my intention that no scheduler computation changed as a part of this MR*--the
scheduler should run identically to the way it has--only now better tested.

Please check it out and let me know what you think!
Hy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20210421/67f21771/attachment.htm>


More information about the Kstars-devel mailing list