Example #1
0
func testRollbackPreparedError(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) {
	t.Log("testRollbackPreparedError")
	f.HasError = true
	testErrorHelper(t, f, "RollbackPrepared", func(ctx context.Context) error {
		return conn.RollbackPrepared(ctx, TestTarget, Dtid, RollbackTransactionID)
	})
	f.HasError = false
}
Example #2
0
func testRollbackPrepared(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) {
	t.Log("testRollbackPrepared")
	ctx := context.Background()
	ctx = callerid.NewContext(ctx, TestCallerID, TestVTGateCallerID)
	err := conn.RollbackPrepared(ctx, TestTarget, Dtid, RollbackTransactionID)
	if err != nil {
		t.Fatalf("RollbackPrepared failed: %v", err)
	}
}
Example #3
0
func testRollbackPreparedPanics(t *testing.T, conn tabletconn.TabletConn, f *FakeQueryService) {
	t.Log("testRollbackPreparedPanics")
	testPanicHelper(t, f, "RollbackPrepared", func(ctx context.Context) error {
		return conn.RollbackPrepared(ctx, TestTarget, Dtid, RollbackTransactionID)
	})
}