Fix CoronerSpec instability (#30494)
Tested in https://github.com/akka/akka/pull/30437 that indeed looking at the threads 'too soon' might miss the deadlock.
This commit is contained in:
parent
6e0158e221
commit
5ecd26d369
1 changed files with 5 additions and 0 deletions
|
|
@ -144,6 +144,11 @@ object Coroner {
|
|||
#Heap usage: ${memMx.getHeapMemoryUsage()}
|
||||
#Non-heap usage: ${memMx.getNonHeapMemoryUsage()}""".stripMargin('#'))
|
||||
|
||||
// If we look too soon, we've seen the JVM report a thread
|
||||
// (in that case deadlock-thread-a from CoronerSpec)
|
||||
// waiting on the lock while no thread seemed to be holding it
|
||||
Thread.sleep(300)
|
||||
|
||||
def dumpAllThreads: Seq[ThreadInfo] =
|
||||
threadMx.dumpAllThreads(threadMx.isObjectMonitorUsageSupported, threadMx.isSynchronizerUsageSupported).toSeq
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue