Is your feature request related to a problem? Please describe.
Failpoint unit tests require taking a global lock, preventing test parallelism. An alternate or complimentary solution to a global lock (https://github.com/pingcap/fail-rs/issues/23) would be to have a thread-local failpoint configuration, protected by a guard.
Describe the solution you'd like
Add a thread-local configuration that is protected by a guard that performs teardown.
Is your feature request related to a problem? Please describe.
Failpoint unit tests require taking a global lock, preventing test parallelism. An alternate or complimentary solution to a global lock (https://github.com/pingcap/fail-rs/issues/23) would be to have a thread-local failpoint configuration, protected by a guard.
Describe the solution you'd like Add a thread-local configuration that is protected by a guard that performs teardown.
Describe alternatives you've considered Global locks: https://github.com/pingcap/fail-rs/issues/23
Additional context This would work for single-threaded test cases, but not generally for tests that require multiple threads.