Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failpoint doesn't work when Inject function defined in a closure argument #70

Closed
sleepymole opened this issue Jan 19, 2022 · 0 comments · Fixed by #72
Closed

Failpoint doesn't work when Inject function defined in a closure argument #70

sleepymole opened this issue Jan 19, 2022 · 0 comments · Fixed by #72
Labels
bug Something isn't working

Comments

@sleepymole
Copy link

sleepymole commented Jan 19, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
	f := func(g func() error) {}
	f(func() error {
		failpoint.Inject("XXX", func() {
			failpoint.Return(errors.New("mock error"))
		})
		return nil
	})
  1. What did you expect to see?
    After enabled failpoint,failpoint.Inject can be changed to failpoint.Eval.

  2. What did you see instead?

Nothing changed

  1. Versions of the failpoint

    • failpoint-ctl version (run failpoint-ctl -V):
      The version comes from tidb's go.mod
      v0.0.0-20200702092429-9f69995143ce
      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant