Skip to content

Commit 73747ec

Browse files
authored
Rollup merge of rust-lang#82349 - tmiasko:pretty-test-timeout, r=Mark-Simulacrum
test: Print test name only once on timeout Pretty formatter when using multiple test threads displays test name twice on timeout event. This implicitly suggest that those are two different events, while in fact they are always printed together. Print test name only once. Before: ``` running 3 tests test src/lib.rs - c (line 16) ... ok test src/lib.rs - a (line 3) ... ok test src/lib.rs - b (line 9) ... test src/lib.rs - b (line 9) has been running for over 60 seconds test src/lib.rs - b (line 9) ... ok ``` After: ``` running 3 tests test src/lib.rs - c (line 16) ... ok test src/lib.rs - a (line 3) ... ok test src/lib.rs - b (line 9) has been running for over 60 seconds test src/lib.rs - b (line 9) ... ok ```
2 parents 01b822b + 88753ce commit 73747ec

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

library/test/src/formatters/pretty.rs

-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,6 @@ impl<T: Write> OutputFormatter for PrettyFormatter<T> {
222222
}
223223

224224
fn write_timeout(&mut self, desc: &TestDesc) -> io::Result<()> {
225-
if self.is_multithreaded {
226-
self.write_test_name(desc)?;
227-
}
228-
229225
self.write_plain(&format!(
230226
"test {} has been running for over {} seconds\n",
231227
desc.name,

0 commit comments

Comments
 (0)