-
Notifications
You must be signed in to change notification settings - Fork 568
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
Make ProcessScheduleServiceTest deterministic #11263
Conversation
In some tests the thread will never be idle because the tasks are submitted to it continuosly. So we cannot waitUntilDone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Very nice! Can you share the modification to our team about the new helpers in ControlledActorScheduler
and how they can be used, esp. when using timers?
I guess we should also backport this? Or is 8.1 not affected? The ControlledActorScheduler
changes might be useful even in 8.0 as well, even if we don't have the engine refactoring parts.
This should be backported. Atleast some of these tests are already in 8.1. |
bors merge |
Build succeeded: |
Backport failed for Please cherry-pick the changes locally. git fetch origin stable/8.1
git worktree add -d .worktree/backport-11263-to-stable/8.1 origin/stable/8.1
cd .worktree/backport-11263-to-stable/8.1
git checkout -b backport-11263-to-stable/8.1
ancref=$(git merge-base b91cdd3bc4da5cf3518bef4566a9aa947746a82c 590466a53ec95496a2d43b8246e1c7bd4587de1d)
git cherry-pick -x $ancref..590466a53ec95496a2d43b8246e1c7bd4587de1d |
Description
Migrated ProcessScheduleServiceTest to use ControlledActorScheduler.
Except two tests
shouldNotExecuteScheduledTaskIfNotInProcessingPhase
andshouldExecuteScheduledTaskInProcessing
, all other tests are deterministic and does not rely on timeouts. These two tests repeatedly submit tasks. So we cannot useworkUntilDone
to wait for all tasks to be executed. So they rely on timeouts and hopes that the expected task is executed within the timeout.Related issues
closes #10887