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