Skip to content

Is there any demo or userguide for failpoint? #29

Description

@sh1yu

I cannot have any idea that how to use failpoint. I tried write demo like this:

 var outerVar = "declare in outer scope"

err := failpoint.Enable("failpoint-name", "return")
if err != nil {
	fmt.Println(err)
	return
}

failpoint.Inject("failpoint-name", func(val failpoint.Value) {
	fmt.Println("unit-test", val, outerVar)
})

There isn't have any output. How could I use it in the right way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions