Commit 77e87c2
committed
Fix: Remove panic-in-panic failure when running tests
Symptom:
```
thread panicked while processing panic. aborting.
```
It seems to be a MPSC channel hangup problem, where the
reciever does not exist any more when transmitting value
through channel.
Root cause is not fully understood but a guess is that we
get some kind of race condition between multiple test cases
setting and resetting the `catch_panic` functionality.
Please Note! Since `std::panic::set_hook` is global, we might have
a race condition when multiple threads are running tests in
parallel. In that case, panics from other threads might interfere
with each other in the custom hook. Leaving aa-is for now.1 parent 57d4e91 commit 77e87c2
2 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
258 | 263 | | |
259 | 264 | | |
260 | 265 | | |
| |||
266 | 271 | | |
267 | 272 | | |
268 | 273 | | |
269 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
270 | 278 | | |
271 | 279 | | |
272 | 280 | | |
| |||
0 commit comments