Skip to content

Commit

Permalink
chore(ci): fix long debugger test times (#4599)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

We're currently not closing the spawned bash process so we have to wait
for the full timeout duration before the test registers as successful.
This PR then adds an explicit call to `exit` to finish the test early.

I've also shortened the timeout as 2 minutes seems excessive.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [ ] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench committed Apr 3, 2024
1 parent 7a08a3d commit a0d3040
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tooling/debugger/tests/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mod tests {
let nargo_bin =
cargo_bin("nargo").into_os_string().into_string().expect("Cannot parse nargo path");

let timeout_seconds = 120;
let timeout_seconds = 20;
let mut dbg_session =
spawn_bash(Some(timeout_seconds * 1000)).expect("Could not start bash session");

Expand Down Expand Up @@ -51,5 +51,8 @@ mod tests {
dbg_session
.exp_regex(".*Circuit witness successfully solved.*")
.expect("Expected circuit witness to be successfully solved.");

// Exit the bash session.
dbg_session.send_line("exit").expect("Failed to quit bash session");
}
}

0 comments on commit a0d3040

Please sign in to comment.