func testReadTransactionPanics(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testReadTransactionPanics") testPanicHelper(t, f, "ReadTransaction", func(ctx context.Context) error { _, err := conn.ReadTransaction(ctx, TestTarget, Dtid) return err }) }
func testReadTransactionError(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testReadTransactionError") f.HasError = true testErrorHelper(t, f, "ReadTransaction", func(ctx context.Context) error { _, err := conn.ReadTransaction(ctx, TestTarget, Dtid) return err }) f.HasError = false }
func testReadTransaction(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testReadTransaction") ctx := context.Background() ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID) metadata, err := conn.ReadTransaction(ctx, TestTarget, Dtid) if err != nil { t.Fatalf("ReadTransaction failed: %v", err) } if !reflect.DeepEqual(metadata, Metadata) { t.Errorf("Unexpected result from Execute: got %v wanted %v", metadata, Metadata) } }