Skip to content

Commit 7ca8c61

Browse files
authored
Merge pull request #113 from timbuchwaldt/patch-1
Use error logger in timeout condition
2 parents f3f369f + cbc5f29 commit 7ca8c61

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

core-dump-composer/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ fn main() -> Result<(), anyhow::Error> {
3636
match result {
3737
Ok(inner_result) => inner_result,
3838
Err(_error) => {
39-
println!("timeout");
40-
process::exit(1);
39+
error!("Timeout error during coredump processing.");
40+
process::exit(32);
4141
}
4242
}
4343
}

core-dump-composer/tests/timeout.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ fn timeout_scenario() -> Result<(), std::io::Error> {
6565
.output()
6666
.expect("Couldn't execute");
6767

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

0 commit comments

Comments
 (0)