From b43e781f274f7e404591cb1a554e7cc574d12e4e Mon Sep 17 00:00:00 2001 From: Ryan Fowler Date: Mon, 11 May 2020 15:38:23 +0100 Subject: [PATCH] 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 --- .../kotlin/net/corda/client/rpc/RPCStabilityTests.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/rpc/src/integration-test/kotlin/net/corda/client/rpc/RPCStabilityTests.kt b/client/rpc/src/integration-test/kotlin/net/corda/client/rpc/RPCStabilityTests.kt index 6875840d04..e476e0e581 100644 --- a/client/rpc/src/integration-test/kotlin/net/corda/client/rpc/RPCStabilityTests.kt +++ b/client/rpc/src/integration-test/kotlin/net/corda/client/rpc/RPCStabilityTests.kt @@ -70,7 +70,11 @@ class RPCStabilityTests { private fun waitUntilNumberOfThreadsStable(executorService: ScheduledExecutorService): Map> { val values = ConcurrentLinkedQueue>>() 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.getAllStackTraces() + .filterKeys { !it.name.contains("ForkJoinPool.commonPool") } + .mapValues { it.value.toList() } + values.add(map) if (values.size > 5) { values.poll() }