mirror of
https://github.com/corda/corda.git
synced 2025-06-22 17:09:00 +00:00
node-driver: Only stop() artemis if it started fine
This commit is contained in:
@ -227,6 +227,7 @@ class DriverDSL(
|
|||||||
serverHostPort = networkMapAddress,
|
serverHostPort = networkMapAddress,
|
||||||
myHostPort = portAllocation.nextHostAndPort()
|
myHostPort = portAllocation.nextHostAndPort()
|
||||||
)
|
)
|
||||||
|
var messagingServiceStarted = false
|
||||||
|
|
||||||
fun registerProcess(process: Process) = registeredProcesses.push(process)
|
fun registerProcess(process: Process) = registeredProcesses.push(process)
|
||||||
|
|
||||||
@ -252,7 +253,9 @@ class DriverDSL(
|
|||||||
it.destroyForcibly()
|
it.destroyForcibly()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
messagingService.stop()
|
if (messagingServiceStarted){
|
||||||
|
messagingService.stop()
|
||||||
|
}
|
||||||
|
|
||||||
// Check that we shut down properly
|
// Check that we shut down properly
|
||||||
addressMustNotBeBound(messagingService.myHostPort)
|
addressMustNotBeBound(messagingService.myHostPort)
|
||||||
@ -303,6 +306,7 @@ class DriverDSL(
|
|||||||
startNetworkMapService()
|
startNetworkMapService()
|
||||||
messagingService.configureWithDevSSLCertificate()
|
messagingService.configureWithDevSSLCertificate()
|
||||||
messagingService.start()
|
messagingService.start()
|
||||||
|
messagingServiceStarted = true
|
||||||
// We fake the network map's NodeInfo with a random public key in order to retrieve the correct NodeInfo from
|
// We fake the network map's NodeInfo with a random public key in order to retrieve the correct NodeInfo from
|
||||||
// the network map service itself
|
// the network map service itself
|
||||||
val nodeInfo = NodeInfo(
|
val nodeInfo = NodeInfo(
|
||||||
|
Reference in New Issue
Block a user