Skip to content

Commit

Permalink
chore: add warning on persisted invariant scenario failure
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy committed Oct 23, 2024
1 parent cd71da4 commit ce96792
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/forge/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,11 @@ impl ContractRunner<'_> {
invariant_contract.call_after_invariant,
) {
if !success {
let _= sh_warn!("\
Replayed invariant failure from {:?} file. \
Run `forge clean` or remove file to ignore failure and to continue invariant test campaign.",
failure_file.as_path()
);
// If sequence still fails then replay error to collect traces and
// exit without executing new runs.
let _ = replay_run(
Expand Down

0 comments on commit ce96792

Please sign in to comment.