You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2024. It is now read-only.
Fail points are code instrumentations that allow errors and other behavior to be injected dynamically at runtime, primarily for testing purposes. Fail points are flexible and can be configured to exhibit a variety of behavior, including panics, early returns, and sleeping. They can be controlled both programmatically and via the environment, and can be triggered conditionally and probabilistically.
11
11
@@ -17,19 +17,19 @@ First, add this to your `Cargo.toml`:
17
17
18
18
```toml
19
19
[dependencies]
20
-
fail = "0.4"
20
+
failpoints = "0.1"
21
21
```
22
22
23
-
Now you can import the `fail_point!` macro from the `fail` crate and use it to inject dynamic failures.
23
+
Now you can import the `failpoint!` macro from the `failpoints` crate and use it to inject dynamic failures.
24
24
Fail points generation by this macro is disabled by default, and can be enabled where relevant with the `failpoints` Cargo feature.
25
25
26
26
As an example, here's a simple program that uses a fail point to simulate an I/O panic:
0 commit comments