1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00

chore: make test server less noisy (#21782)

Test server was printing a lot of "early eof" messages eg when running
`cargo test integration::npm`. This commit filters out these messages.
This commit is contained in:
Bartek Iwańczuk 2024-01-03 23:43:34 +01:00 committed by GitHub
parent 9526520cf0
commit 7f1c41d245
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,10 @@ where
.boxed_local();
if let Err(e) = fut.await {
eprintln!("{}: {:?}", options.error_msg, e);
let err_str = e.to_string();
if !err_str.contains("early eof") {
eprintln!("{}: {:?}", options.error_msg, e);
}
}
}
@ -84,7 +87,10 @@ pub async fn run_server_with_acceptor<'a, A, F, S>(
.boxed_local();
if let Err(e) = fut.await {
eprintln!("{}: {:?}", error_msg, e);
let err_str = e.to_string();
if !err_str.contains("early eof") {
eprintln!("{}: {:?}", error_msg, e);
}
}
}
@ -127,7 +133,10 @@ async fn hyper_serve_connection<I, F, S>(
};
if let Err(e) = result {
eprintln!("{}: {:?}", error_msg, e);
let err_str = e.to_string();
if !err_str.contains("early eof") {
eprintln!("{}: {:?}", error_msg, e);
}
}
}