Revert "NOTICK Ignore JUnit time threads in RPCStabilityTests (#6201)" (#6204)

This reverts commit ecf74053
This commit is contained in:
Dan Newton 2020-04-30 13:17:40 +01:00 committed by GitHub
parent 99fd08909d
commit 4639a8f68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,11 +70,7 @@ class RPCStabilityTests {
private fun waitUntilNumberOfThreadsStable(executorService: ScheduledExecutorService): Map<Thread, List<StackTraceElement>> { private fun waitUntilNumberOfThreadsStable(executorService: ScheduledExecutorService): Map<Thread, List<StackTraceElement>> {
val values = ConcurrentLinkedQueue<Map<Thread, List<StackTraceElement>>>() val values = ConcurrentLinkedQueue<Map<Thread, List<StackTraceElement>>>()
return poll(executorService, "number of threads to become stable", 250.millis) { return poll(executorService, "number of threads to become stable", 250.millis) {
// Exclude threads from JUnits timeout group which we use for timing out tests values.add(Thread.getAllStackTraces().mapValues { it.value.toList() })
val map: Map<Thread, List<StackTraceElement>> = Thread.getAllStackTraces()
.filterKeys { it.threadGroup.name != "FailOnTimeoutGroup" }
.mapValues { it.value.toList() }
values.add(map)
if (values.size > 5) { if (values.size > 5) {
values.poll() values.poll()
} }