mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
Address #665, add more leak tests
This commit is contained in:
@ -456,10 +456,7 @@ class DriverDSL(
|
||||
|
||||
override fun shutdown() {
|
||||
_shutdownManager?.shutdown()
|
||||
_executorService?.apply {
|
||||
shutdownNow()
|
||||
require(awaitTermination(1, TimeUnit.SECONDS))
|
||||
}
|
||||
_executorService?.shutdownNow()
|
||||
}
|
||||
|
||||
private fun establishRpc(nodeAddress: HostAndPort, sslConfig: SSLConfiguration): ListenableFuture<CordaRPCOps> {
|
||||
|
@ -173,15 +173,11 @@ class RPCServer(
|
||||
rpcExecutor?.shutdownNow()
|
||||
reaperExecutor?.shutdownNow()
|
||||
sessionAndConsumers.forEach {
|
||||
it.consumer.close()
|
||||
it.session.close()
|
||||
it.sessionFactory.close()
|
||||
}
|
||||
observableMap.invalidateAll()
|
||||
reapSubscriptions()
|
||||
sessionAndProducerPool.close().forEach {
|
||||
it.producer.close()
|
||||
it.session.close()
|
||||
it.sessionFactory.close()
|
||||
}
|
||||
lifeCycle.justTransition(State.FINISHED)
|
||||
@ -257,7 +253,6 @@ class RPCServer(
|
||||
}
|
||||
|
||||
private fun reapSubscriptions() {
|
||||
lifeCycle.requireState(State.STARTED)
|
||||
observableMap.cleanUp()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user