-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Test freezes in CI after upgrade to v2.13.0 from v2.12.0 #387
Comments
The same happens on one test case for us as well, in a Github Actions runner on all python versions from 3.8 to 3.12. Github actions log: https://github.com/bimmerconnected/bimmer_connected/actions/runs/6247430371/job/16999245011?pr=568 |
* master: Update test requirements to time_machine<2.13.0 due to adamchainz/time-machine#387 (bimmerconnected#570)
* master: Update test requirements to time_machine<2.13.0 due to adamchainz/time-machine#387 (bimmerconnected#570)
Thanks for the exact test case @rikroe . Can either of you reproduce the freeze locally? If you run tests with Python Development Mode on and kill the process, |
Upgraded all packages in my venv and now I'm able to reproduce the issue locally as well. However, when running only the test that seems to be the culprit, it just works perfectly:
Also, with
Stack trace with 0.13.0 (full stack trace)
python3 -X dev -m pytest bimmer_connected/tests/test_remote_services.py --full-trace
|
It sounds like you have some test pollution, where one test affects this one. The detect-test-pollution tool could help. Without a project to test on myself, I can’t be much more help. |
Appreciate your help, many thanks! You're right, there seems to be a test pollution (thanks for the hint to detect-test-pollution!):
The test case However I don't understand why it is working perfectly with 2.12.0 and not working with 2.13.0. To reproduce you should be able to use the repo:
|
same problem with python 3.11.5 and 2.13.0 time-machine |
Same problem here, looks like it fails to get out asyncio method |
Can confirm and I'm testing on just one test id. thinking out loud |
Same problem with python 3.11.1 and 2.13.0 time-machine. |
This problem got fixed (but the fix is not yet released) in freezegun: spulec/freezegun#470 So maybe inspiration can bet taken from there. |
We are also experiencing freezes on some tests that prevents us from upgrading. In our case, we are using also async-solipsism to test async code, which messes up with the monotonic clock. Since I didn't have the time to investigate yet. But now that I see other people are experiencing freezes, I wonder if that's really the issue. I guess there is no test and no guarantees that |
Same issue here on Python 3.11.1 with my async tests. |
I was responsible for the changes in freezegun fix but I think I changed my mind about the issue since then :). The more I was using libraries like time-machine or freezegun in tests of asyncio code, the more I am leaning towards the conclusion that
|
Maybe the best compromise is to have an option to decide if one wants to patch the monotonic clock or not. |
Hey this is a pretty big show stopper - my tests run fine locally but hang in Github Actions. Can we make mocking the monotonic clock optional? |
Addressing this issue is becoming more pressing now as 2.12 doesn't work with Python 3.13, so it is starting to block supporting newer Python versions 😢 |
Python Version
3.10.13
pytest Version
No response
Package Version
2.13.0
Description
When upgrading from 2.12 to 2.13 one Django (4.2.5) test always freezes, but only in the CI environment. It is a test that uses TransactionTestCase as well as Django Channels.
What actions can be taken to help triage the core issue?
The text was updated successfully, but these errors were encountered: