func testSetRollbackError(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testSetRollbackError") f.HasError = true testErrorHelper(t, f, "SetRollback", func(ctx context.Context) error { return conn.SetRollback(ctx, TestTarget, Dtid, RollbackTransactionID) }) f.HasError = false }
func testSetRollback(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testSetRollback") ctx := context.Background() ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID) err := conn.SetRollback(ctx, TestTarget, Dtid, RollbackTransactionID) if err != nil { t.Fatalf("SetRollback failed: %v", err) } }
func testSetRollbackPanics(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testSetRollbackPanics") testPanicHelper(t, f, "SetRollback", func(ctx context.Context) error { return conn.SetRollback(ctx, TestTarget, Dtid, RollbackTransactionID) }) }