Open tzoiker opened 3 years ago
This also causes issues with celery during tests due to kombu relying on monotonic https://github.com/celery/kombu/blob/master/kombu/transport/virtual/base.py#L950-L965
Manifests as RuntimeError: Worker thread failed to exit within the allocated timeout. Consider raising
shutdown_timeoutif your tasks take longer to execute.
Workaround for now is we locked freezegun at 1.0.0
This causes all manner of problems with aiokafka
as well, which are nearly impossible to debug, as it apparently just hangs when you give it timeouts.
Be very careful what you wrap with freezetime
if you're using async.
My solution for now was to wrap factory fixtures with freezetime
instead of wrapping tests.
I have faced the very same problem as in #383, but in another context and it was very painful to debug.
aiormq
library to connect to RabbitMQ;freeze_time
in some tests lead to the following:freeze_time
patched monotonic time;The problem was aggravated by the fact that I didn't pin the minor version of
freezegun
in the testing pipeline so that when1.1.0
was released tests started to fail unexpectedly.Some suggestions:
Thank you for consideration.