Register an action func to be called when a failpoint is evaluated
还没有人认领这个 Issue。
评估
调研方向
该 issue 未指定文件、测试或入口点。定位启用和评估 failpoint 的路径,然后确定 callback API 应如何接收每个经过评估的值,并添加覆盖率以表明每次进行评估时都会运行 callback。
由索引模型根据 Issue 内容生成。
描述
Feature Request
Is your feature request related to a problem? Please describe:
When writing a unit test, I want to know if a failpoint is evaluated and the evaluated value.
Describe the feature you'd like:
When enabling a failpoint, pass in a function callback func(val interface{}). Afterwards, whenever the failpoint is evaluated, failpoint is responsible to call callback.
Describe alternatives you've considered:
Allow user to register a function to replace term. Every time the failpoint is evaluated, it calls the function to get the value.
Teachability, Documentation, Adoption, Optimization:
- 主要语言
- Go
- 星标
- 896
- 派生
- 69
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingcap/failpoint 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 30/100
-
expect `Enable()` inTerm:'off' does not trigger failpoint code, but it's not as expect可能已有人在做 @1fanwang 于 26 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 45/100
-
question
难度 3/5 1-2 天 新手友好度 35/100
-
bug
难度 3/5 1-2 天 新手友好度 35/100
-
bug
难度 3/5 1-2 天 新手友好度 45/100
查看 pingcap/failpoint 的全部 Issue
相似的 Issue
-
bug frontend grammar sev-3
难度 2/5 1-3 小时 新手友好度 63/100
-
connector docs good first issue
难度 2/5 1-3 小时 新手友好度 72/100
soma-intelligence/open-health-sync#134 ·
维护者通常 1 天内回复
-
bug frontend
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 3 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
oss/0 pending team/container-integrations
难度 2/5 1-3 小时 新手友好度 68/100
DataDog/datadog-agent#58323 ·
维护者通常 1 天内回复