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