diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-02-21 15:26:50 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-21 15:26:50 +0900 |
| commit | d7fb4de79172910bba6ea632196170647dcf11cb (patch) | |
| tree | 4c46aed4315f5671ed006deb93874744aeef9ce9 | |
| parent | 01e1d2d5e842cc2ded57f65549603772278f00d6 (diff) | |
| parent | 88753cead814a0830acdb527f513957fb9fe620a (diff) | |
| download | rust-d7fb4de79172910bba6ea632196170647dcf11cb.tar.gz rust-d7fb4de79172910bba6ea632196170647dcf11cb.zip | |
Rollup merge of #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 ```
| -rw-r--r-- | library/test/src/formatters/pretty.rs | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/library/test/src/formatters/pretty.rs b/library/test/src/formatters/pretty.rs index 6fa36929841..5e41d6d9692 100644 --- a/library/test/src/formatters/pretty.rs +++ b/library/test/src/formatters/pretty.rs @@ -222,10 +222,6 @@ impl<T: Write> OutputFormatter for PrettyFormatter<T> { } fn write_timeout(&mut self, desc: &TestDesc) -> io::Result<()> { - if self.is_multithreaded { - self.write_test_name(desc)?; - } - self.write_plain(&format!( "test {} has been running for over {} seconds\n", desc.name, |
