Increase shutdown action timeout. In some tests using driver, the shutdown

can be invoked before the notary node gets started, and the node disposal action
times out, leading to unclosed message brokers and port conflicts.
This commit is contained in:
Andrius Dagys 2018-01-12 17:16:10 +00:00
parent 29b52f66dc
commit 89b64da12b

View File

@ -41,14 +41,14 @@ class ShutdownManager(private val executorService: ExecutorService) {
}
}
val shutdowns = shutdownActionFutures.map { Try.on { it.getOrThrow(1.seconds) } }
val shutdowns = shutdownActionFutures.map { Try.on { it.getOrThrow(60.seconds) } }
shutdowns.reversed().forEach {
when (it) {
is Try.Success ->
try {
it.value()
} catch (t: Throwable) {
log.warn("Exception while shutting down", t)
log.warn("Exception while calling a shutdown action, this might create resource leaks", t)
}
is Try.Failure -> log.warn("Exception while getting shutdown method, disregarding", it.exception)
}