-
Notifications
You must be signed in to change notification settings - Fork 264
Bug 1527583 - Queue doesn't take jobs from "unscheduled" to "pending" #229
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
Conversation
djmitche
left a comment
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.
The service's polling is started in withPollingServices in test/helper.js, and specifically helper.startPollingService.
testing.poll runs the given function repeatedly, delaying beween runs, until it succeeds. The idea is to keep checking until the dependency tracker runs.
We use runWithFakeTime, which sets up zurvan, which fakes out all of Node's timers.
Logging with just DEBUG=iterate,watchdog, I see that it runs an iteration and then schedules the next one. Logging the duration it's scheduling, it's 250000, since pollingDelay is in ms and waitTime is in seconds. With that fixed, the tests pass.
It would be great to update all of the polled services to use tc-lib-iterate at the same time.
Note: unrelated to this issue, withPollingService should probably call svc.terminate() in a teardown function, just to avoid missing that when a test fails (and probably causing mayhem for subsequent tests). That might be a nice drive-by fix to include here.
Note 2: the "..after passage of.." error message has the incorrect time. It's using a value that is decremented down to zero. Oops. A fix for that would be great, too.
This is missing whatever is needed to start and stop the pollers in the queue unit tests because I cannot make sense of how polling is managed in the tests.
|
merging as a break-fix |
|
The queue tests were failing to run, which is why they were green despite needing 6e5c4fd |
|
I think @imbstack has fixed that issue in master already. |
imbstack
left a comment
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.
retroactive r+
This is missing whatever is needed to start and stop the pollers in the
queue unit tests because I cannot make sense of how polling is managed
in the tests.
Bugzilla Bug: 1527583