]> git.lizzy.rs Git - rust.git/commit
test: Print test name only once on timeout
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Sun, 21 Feb 2021 00:00:00 +0000 (00:00 +0000)
committerTomasz Miąsko <tomasz.miasko@gmail.com>
Sun, 21 Feb 2021 00:00:00 +0000 (00:00 +0000)
commit88753cead814a0830acdb527f513957fb9fe620a
tree9dd2b9d41fe8b025f76b780d7df71f12c931d3c2
parent83b30a639d5abd1270ade35d9bd92271f5a5ba18
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
```
library/test/src/formatters/pretty.rs