fail-rs
fail-rs copied to clipboard
Fail points for rust
Signed-off-by: v01dstar
Support for defining fail points with async blocks. E.g.: ```rust async fn async_fn() { fail_point!("async_return", |s| async { (async {}).await; s.map_or(2, |s| s.parse().unwrap()) }); } ```
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`....
The `fail` crate's crate-level doc-comment first says— https://github.com/tikv/fail-rs/blob/2cf1175a1a5cc2c70bd20ebd45313afd69b558fc/src/lib.rs#L107-L108 —and then later says— https://github.com/tikv/fail-rs/blob/2cf1175a1a5cc2c70bd20ebd45313afd69b558fc/src/lib.rs#L219-L220 Should the latter advice say "binary" rather than "crate"?
**Is your feature request related to a problem? Please describe.** fail-rs utilizes global registry to expose simple APIs and convenient FailPoint definition. But it also means all parallel tests have...
**Is your feature request related to a problem? Please describe.** Make fail-point support dependencies (one fail-point wait for another before proceed) we can refer to the implementation of rocksdb syncpoint...
Signed-off-by: Liqi Geng The check-condition code in failpoint runs all the time even it is not open. It may lead to bad performance if checking the condition is very expensive...
This can probably be done shortly after upgrading to 2018: https://github.com/pingcap/fail-rs/issues/21 I'll probably want to clean up the documentation a bit. It's overwhelming atm.
**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...
**Is your feature request related to a problem? Please describe.** In most of my failpoints I need to use the condition to enable a fail point, but I rarely use...