-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 Fix app server mock in celery-library
#7989
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 app server mock in celery-library
#7989
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7989 +/- ##
==========================================
+ Coverage 87.89% 89.69% +1.79%
==========================================
Files 1842 1246 -596
Lines 71060 53101 -17959
Branches 1231 199 -1032
==========================================
- Hits 62460 47627 -14833
+ Misses 8244 5407 -2837
+ Partials 356 67 -289
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
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.
Pull Request Overview
This PR addresses a hanging test issue by properly initializing the mock AppServer’s lifespan in the Celery test fixture.
- Signals test startup completion via
startup_completed_event.set() - Waits on
shutdown_eventto allow clean teardown and prevent hangs
matusdrobuliak66
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.
👍 thanks!
bisgaard-itis
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.
Thanks for the quick fix. Let's get this in as quickly as possible as this is blocking deployment to master if I am not mistaken
celery-library
| async def lifespan(self, startup_completed_event: threading.Event) -> None: | ||
| pass | ||
| startup_completed_event.set() | ||
| await self.shutdown_event.wait() # wait for shutdown |
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.
and is there indeed a timeout in the test in case this fails?



What do these changes do?
This PR fixes hanging tests due to a missing initialization of AppServer mock in Celery tests.
The main issue here is that CI didn't detect the problem, since a cancelled test gave Unit Test passing.
Related issue/s
How to test
Dev-ops