Description
The problem: When having sporadic timeout exceptions, it is hard to tell from the stacktrace where the code was hanging.
A debugger might not be available (sporadic, on build system)
Also the stackdump of other threads might be very helpful, because the timeout might be caused by other threads activity or dead lock.
An own extension seems to be not reasonable, as the timeout control also from maven, is part of the infrastructure.
Deliverables
- Either have a hook, that gets called before the
thread.interrupt()
is called in org.junit.jupiter.engine.extension.TimeoutInvocation.InterruptTask.run(). - Or have a way to activate collecting a stackdump of all threads (just before calling interrupt() as above) and put it into the TimeoutException.
- Or have collected stackdumps of all threads as information always in the TimeoutException