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