Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread-local failpoints #24

Open
brson opened this issue Jan 3, 2019 · 1 comment
Open

Thread-local failpoints #24

brson opened this issue Jan 3, 2019 · 1 comment

Comments

@brson
Copy link
Collaborator

brson commented Jan 3, 2019

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 (#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: #23

Additional context
This would work for single-threaded test cases, but not generally for tests that require multiple threads.

@BusyJay
Copy link
Member

BusyJay commented Jan 24, 2019

Or the library can expose the FailPointRegistry to users, so users can control the lock pattern more precisely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants