Skip to content

Commit

Permalink
fix main
Browse files Browse the repository at this point in the history
  • Loading branch information
lorbax committed Apr 30, 2024
1 parent 092b171 commit c8518af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 50 deletions.
48 changes: 0 additions & 48 deletions test/message-generator/test/pool-sri-test-1-standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,54 +144,6 @@
}
}
},
{
"command": "cargo",
"args": [
"run",
"../../../test/message-generator/mock/template-provider-mock0.json"
],
"conditions": {
"WithConditions": {
"conditions": [
{
"output_string": "Running `target/debug/message_generator_sv2 ../../../test/message-generator/mock/template-provider-mock0.json`",
"output_location": "StdErr",
"late_condition": false,
"condition": true
}
],
"timer_secs": 320,
"warn_no_panic": false
}
}
},
{
"command": "cargo",
"args": [
"llvm-cov",
"--no-report",
"run",
"-p",
"pool_sv2",
"--",
"-c",
"../test/config/pool-mock-tp.toml"
],
"conditions": {
"WithConditions": {
"conditions": [
{
"output_string": "Listening for encrypted connection on: 127.0.0.1:34254",
"output_location": "StdOut",
"late_condition": false,
"condition": true
}
],
"timer_secs": 320,
"warn_no_panic": false
}
}
},
{
"command": "cargo",
"args": [
Expand Down
6 changes: 4 additions & 2 deletions utils/message-generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::{
},
vec::Vec,
};
use tracing::info;
use tracing::{error, info};
use tracing_core::{Event, Subscriber};
use tracing_subscriber::{
filter::EnvFilter,
Expand Down Expand Up @@ -401,7 +401,8 @@ async fn main() {
let pass = Arc::new(AtomicBool::new(false));
{
let fail = fail.clone();
std::panic::set_hook(Box::new(move |_| {
std::panic::set_hook(Box::new(move |info| {
error!("{:#?}", info);
fail.store(true, Ordering::Relaxed);
}));
}
Expand All @@ -423,6 +424,7 @@ async fn main() {
});
}
loop {
tokio::task::yield_now().await;
if fail.load(Ordering::Relaxed) {
clean_up(cleanup).await;
let _ = std::panic::take_hook();
Expand Down

0 comments on commit c8518af

Please sign in to comment.