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