-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(spanner): fix TransactionPingingPool throwing error ''NoneType' object is not callable' #9609
Conversation
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.
Rather than tweak the hand-rolled _Transaction
mock, let's take this as an opportunity to replace it with an "mock autospec" version, which will auttomatically keep the signatures correct.
The mock autospec does not support static attributes which causes test_put_non_full_w_active_txn to fail because txn.committed is a NonCallableMagicMock, not None. I don't see an easy fix for that. Perhaps, it would be easier to go with the original change and have this refactor in a subsequent PR? |
@larkee Hmm, odd: I pasted in that change after making it locally, and got all the tests to pass. Nevertheless, we can update the |
@tseaver PTAL |
TransactionPingingPool is throwing error ''NoneType' object is not callable' when trying to batch insert. This is the fix.