Skip to content

Commit 84e610e

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 96b3200 + 0f36b98 commit 84e610e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

test/src/formatters/pretty.rs

Lines changed: 0 additions & 4 deletions
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)