Exemplo n.º 1
0
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
}
Exemplo n.º 2
0
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)
	}
}
Exemplo n.º 3
0
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)
	})
}