mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
NOTICK Ignore JUnit time threads in RPCStabilityTests
(#6201)
This commit is contained in:
parent
cb84fd86ee
commit
ecf74053c0
@ -70,7 +70,11 @@ class RPCStabilityTests {
|
||||
private fun waitUntilNumberOfThreadsStable(executorService: ScheduledExecutorService): Map<Thread, List<StackTraceElement>> {
|
||||
val values = ConcurrentLinkedQueue<Map<Thread, List<StackTraceElement>>>()
|
||||
return poll(executorService, "number of threads to become stable", 250.millis) {
|
||||
values.add(Thread.getAllStackTraces().mapValues { it.value.toList() })
|
||||
// Exclude threads from JUnits timeout group which we use for timing out tests
|
||||
val map: Map<Thread, List<StackTraceElement>> = Thread.getAllStackTraces()
|
||||
.filterKeys { it.threadGroup.name != "FailOnTimeoutGroup" }
|
||||
.mapValues { it.value.toList() }
|
||||
values.add(map)
|
||||
if (values.size > 5) {
|
||||
values.poll()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user