summaryrefslogtreecommitdiff
path: root/test_util/src
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-01-03 23:43:34 +0100
committerGitHub <noreply@github.com>2024-01-03 22:43:34 +0000
commit7f1c41d245026fe5929f6fb7f60d48cc52d81f2f (patch)
tree8457665af66b6c86d7355205444101453b212a4b /test_util/src
parent9526520cf0309286f2c2f7ebc9fbfa901bbbad36 (diff)
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.
Diffstat (limited to 'test_util/src')
-rw-r--r--test_util/src/servers/hyper_utils.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/test_util/src/servers/hyper_utils.rs b/test_util/src/servers/hyper_utils.rs
index e7af25d92..ea15bba0e 100644
--- a/test_util/src/servers/hyper_utils.rs
+++ b/test_util/src/servers/hyper_utils.rs
@@ -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);
+ }
}
}