8000 [Scheduler] fix brittle test by kbond · Pull Request #50117 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Scheduler] fix brittle test #50117

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

Merged
merged 1 commit into from
Apr 23, 2023
Merged

Conversation

kbond
Copy link
Member
@kbond kbond commented Apr 22, 2023
Q A
Branch? 6.3
Bug fix? no
New feature? no
Deprecations? no
Tickets n/a
License MIT
Doc PR n/a

This fixes the brittle test I introduced in #50113.

$handler->scheduler = $scheduler;

$scheduler->run(['sleep' => 0]);
$scheduler->run(['sleep' => 1]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expected to only have to set this to 1 with the mock clock for it to run instantly but I had add a sleep in the handler below 🤔

@nicolas-grekas
Copy link
Member

Thank you @kbond.

@nicolas-grekas nicolas-grekas merged commit 6c28196 into symfony:6.3 Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0