mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
ENT-5285, ENT-5296 Ignore ForkJoinPool.commonPool threads in RPCStabilityTests
(#6205)
* NOTICK Ignore JUnit time threads in `RPCStabilityTests` * NOTICK - Ignore ForkJoinPool.commonPool as it's not related to our test Co-authored-by: LankyDan <danknewton@hotmail.com>
This commit is contained in:
parent
6afd443e3a
commit
b43e781f27
@ -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 which we don't use for timing our tests
|
||||
val map: Map<Thread, List<StackTraceElement>> = Thread.getAllStackTraces()
|
||||
.filterKeys { !it.name.contains("ForkJoinPool.commonPool") }
|
||||
.mapValues { it.value.toList() }
|
||||
values.add(map)
|
||||
if (values.size > 5) {
|
||||
values.poll()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user