Skip to content

Commit

Permalink
Merge pull request #113 from timbuchwaldt/patch-1
Browse files Browse the repository at this point in the history
Use error logger in timeout condition
  • Loading branch information
No9 authored Feb 21, 2023
2 parents f3f369f + cbc5f29 commit 7ca8c61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core-dump-composer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ fn main() -> Result<(), anyhow::Error> {
match result {
Ok(inner_result) => inner_result,
Err(_error) => {
println!("timeout");
process::exit(1);
error!("Timeout error during coredump processing.");
process::exit(32);
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions core-dump-composer/tests/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ fn timeout_scenario() -> Result<(), std::io::Error> {
.output()
.expect("Couldn't execute");

println!("{}", String::from_utf8_lossy(&cdc.stdout));
assert_eq!("timeout\n", String::from_utf8_lossy(&cdc.stdout));
assert_eq!(1, *&cdc.status.code().unwrap());
// FIXME: It would be nice to check the log output here.
assert_eq!(32, *&cdc.status.code().unwrap());
Ok(())
}

0 comments on commit 7ca8c61

Please sign in to comment.