Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个针对 Cloud Spanner 的应用程序,由于我是一个精明的程序员,我想测试我的代码在 Spanner 开始返回 ABORT 和其他类型的错误时的行为。有没有办法可以模拟这个?
如果您使用官方 Cloud Spanner 客户端库,它们具有各种 TransactionRunner 抽象,它们将重试我们认为是暂时的错误,同时冒出更严重的问题。使用这些是很好的第一步。