本文整理汇总了Golang中github.com/youtube/vitess/go/vt/tabletserver/tabletconn.TabletConn.ResolveTransaction方法的典型用法代码示例。如果您正苦于以下问题:Golang TabletConn.ResolveTransaction方法的具体用法?Golang TabletConn.ResolveTransaction怎么用?Golang TabletConn.ResolveTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/youtube/vitess/go/vt/tabletserver/tabletconn.TabletConn
的用法示例。
在下文中一共展示了TabletConn.ResolveTransaction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: testResolveTransactionError
func testResolveTransactionError(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) {
t.Log("testResolveTransactionError")
f.HasError = true
testErrorHelper(t, f, "ResolveTransaction", func(ctx context.Context) error {
return conn.ResolveTransaction(ctx, TestTarget, Dtid)
})
f.HasError = false
}
示例2: testResolveTransaction
func testResolveTransaction(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) {
t.Log("testResolveTransaction")
ctx := context.Background()
ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID)
err := conn.ResolveTransaction(ctx, TestTarget, Dtid)
if err != nil {
t.Fatalf("ResolveTransaction failed: %v", err)
}
}
示例3: testResolveTransactionPanics
func testResolveTransactionPanics(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) {
t.Log("testResolveTransactionPanics")
testPanicHelper(t, f, "ResolveTransaction", func(ctx context.Context) error {
return conn.ResolveTransaction(ctx, TestTarget, Dtid)
})
}