fail-rs
fail-rs copied to clipboard
Support failpoints group
Let multiple tests run over different threads, meanwhile each configuration doesn't affect others.
- expose
FailPointRegistry
as local registry. -
pub fn create_registry() -> FailPointRegistry
can get a newFailPointRegistry
. So we can bound threads into exact one registry withregister_current(&self)
andderegister_current(&self)
. - add a test to show multiple threads don't affect each other.
close #51
I think all the tests need to be updated, It is better to test in the form of fail_points!
. But I'm busy for special week now, and will continue to improve unit testing later.
@BusyJay I think this PR is ready PTAL
@NingLin-P PTAL
This PR is staled for about a week
So have you tried to use it in TiKV? Is everything working well?
https://github.com/tikv/tikv/pull/8065 @BusyJay