Moved from GitHub dgo/56
Posted by F21:
I have a test suite that uses
DropAll to clear out the database and then use
Alter to update the schema. The tests are then executed. After each run, we drop the database and update the schema again.
rpc error: code = Unknown desc = Pending transactions found. Please retry operation. The error is retryable, but there doesn’t appear to be a way to tell that this is the case when using the client, other than trying to do a string match against the grpc error.
Ideally, there should be a
Retryable interface that is implemented by all classes of retryable errors returned by the client. This would enable us to generalize the code required for retrying transactions by type asserting on the interface. See
Assert errors for behaviour, not type in this article: error handling – The acme of foolishness