Skip to content
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

Latest version doesn't work with freezegun #491

Open
jacobg opened this issue Mar 8, 2023 · 5 comments
Open

Latest version doesn't work with freezegun #491

jacobg opened this issue Mar 8, 2023 · 5 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jacobg
Copy link

jacobg commented Mar 8, 2023

The latest versions 2.11.0 and 1.34.0 don't support using freezegun in unit tests, e.g., in conjunction with google-cloud-datastore. It seems the following merge broke it:
fix: Major refactoring of Polling, Retry and Timeout logic
#462

Version 2.10.2, which is the last version before that merge, works fine.

Do you need more info?

@jacobg
Copy link
Author

jacobg commented Mar 8, 2023

@vam-google

@atulep
Copy link
Contributor

atulep commented Apr 13, 2023

Hey @jacobg ,

From your stack trace, the code failed because of deadline exceeded. Can you try setting deadline to a larger value like 60*60 (hour), for example? In client lib function call, pass deadline arg.

@atulep atulep added the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Apr 13, 2023
@vchudnov-g
Copy link
Contributor

Were you able to get this to work, @jacobg ?

@jacobg
Copy link
Author

jacobg commented Apr 25, 2023

@atulep - A one hour deadline is necessary for unit testing with the datastore emulator? Why doesn't this issue occur without freezegun?

@vchudnov-g - No, I pinned the version of python-api-core before the breaking commit referenced above. Obviously, it's not a permanent solution, but I was waiting and hoping maybe it would be fixed before in the near future.

@vchudnov-g
Copy link
Contributor

@jacobg To clarify, are you saying unpinning the version and passing the deadline argument did not work?

@vchudnov-g vchudnov-g added the priority: p2 Moderately-important priority. Fix may not be included in next release. label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants