func testRollback(t *testing.T, conn tabletconn.TabletConn) { ctx := context.Background() err := conn.Rollback(ctx, rollbackTransactionID) if err != nil { t.Fatalf("Rollback failed: %v", err) } }
func testRollbackPanics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testRollbackPanics") ctx := context.Background() if err := conn.Rollback(ctx, rollbackTransactionID); err == nil || !strings.Contains(err.Error(), "caught test panic") { t.Fatalf("unexpected panic error: %v", err) } }
func testRollbackError(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testRollbackError") f.HasError = true testErrorHelper(t, f, "Rollback", func(ctx context.Context) error { return conn.Rollback(ctx, TestTarget, CommitTransactionID) }) f.HasError = false }
func testRollback(t *testing.T, conn tabletconn.TabletConn) { ctx := context.Background() ctx = callerid.NewContext(ctx, testCallerID, testVTGateCallerID) err := conn.Rollback(ctx, rollbackTransactionID) if err != nil { t.Fatalf("Rollback failed: %v", err) } }
func testRollback(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testRollback") ctx := context.Background() ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID) err := conn.Rollback(ctx, TestTarget, RollbackTransactionID) if err != nil { t.Fatalf("Rollback failed: %v", err) } }
func testRollbackError(t *testing.T, conn tabletconn.TabletConn) { t.Log("testCommitError") ctx := context.Background() var err error if *tabletserver.RPCErrorOnlyInReply { err = conn.Rollback2(ctx, commitTransactionID) } else { err = conn.Rollback(ctx, commitTransactionID) } if err == nil { t.Fatalf("Rollback was expecting an error, didn't get one") } if !strings.Contains(err.Error(), expectedErrMatch) { t.Errorf("Unexpected error from Rollback: got %v, wanted err containing %v", err, expectedErrMatch) } }
func testRollbackError(t *testing.T, conn tabletconn.TabletConn) { t.Log("testRollbackError") ctx := context.Background() err := conn.Rollback(ctx, commitTransactionID) verifyError(t, err, "Rollback") }
func testRollbackError(t *testing.T, conn tabletconn.TabletConn) { ctx := context.Background() err := conn.Rollback(ctx, commitTransactionID) verifyErrorExceptServerCode(t, err, "Rollback") }
func testRollbackPanics(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) { t.Log("testRollbackPanics") testPanicHelper(t, f, "Rollback", func(ctx context.Context) error { return conn.Rollback(ctx, TestTarget, RollbackTransactionID) }) }