fail-rs icon indicating copy to clipboard operation
fail-rs copied to clipboard

Support failpoints group

Open hunterlxt opened this issue 4 years ago • 6 comments

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 new FailPointRegistry. So we can bound threads into exact one registry with register_current(&self) and deregister_current(&self).
  • add a test to show multiple threads don't affect each other.

close #51

hunterlxt avatar May 19 '20 17:05 hunterlxt

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.

hunterlxt avatar May 20 '20 11:05 hunterlxt

@BusyJay I think this PR is ready PTAL

hunterlxt avatar May 26 '20 08:05 hunterlxt

@NingLin-P PTAL

zhangjinpeng87 avatar May 27 '20 01:05 zhangjinpeng87

This PR is staled for about a week

hunterlxt avatar Jun 08 '20 08:06 hunterlxt

So have you tried to use it in TiKV? Is everything working well?

BusyJay avatar Jun 08 '20 09:06 BusyJay

https://github.com/tikv/tikv/pull/8065 @BusyJay

hunterlxt avatar Jun 09 '20 06:06 hunterlxt