From a0d304005c40894cdebe00230cb1763bdcf43f59 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:01:15 +0000 Subject: [PATCH] chore(ci): fix long debugger test times (#4599) # Description ## Problem\* Resolves ## 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. --- tooling/debugger/tests/debug.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tooling/debugger/tests/debug.rs b/tooling/debugger/tests/debug.rs index 4de1b25f48a..b104a2c84ac 100644 --- a/tooling/debugger/tests/debug.rs +++ b/tooling/debugger/tests/debug.rs @@ -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"); @@ -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"); } }