mirror of
https://github.com/corda/corda.git
synced 2025-03-11 06:54:04 +00:00
Merge pull request #6232 from corda/rfowler-os-4.5-os-4.6-20200511
Rfowler os 4.5 os 4.6 20200511
This commit is contained in:
commit
d4cb0e2d87
@ -70,7 +70,11 @@ 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) {
|
||||||
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) {
|
if (values.size > 5) {
|
||||||
values.poll()
|
values.poll()
|
||||||
}
|
}
|
||||||
|
@ -54,8 +54,8 @@ import kotlin.test.currentStackTrace
|
|||||||
class RpcReconnectTests {
|
class RpcReconnectTests {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
// 150 flows take ~5 minutes
|
// this many flows take ~5 minutes
|
||||||
const val NUMBER_OF_FLOWS_TO_RUN = 150
|
const val NUMBER_OF_FLOWS_TO_RUN = 100
|
||||||
|
|
||||||
private val log = contextLogger()
|
private val log = contextLogger()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user