mirror of
https://github.com/corda/corda.git
synced 2025-06-22 09:08:49 +00:00
Minor: Unit testing: InMemoryNetwork.Node.stop, running = false after thread shutdown not before.
This commit is contained in:
@ -16,7 +16,6 @@ import core.ThreadBox
|
|||||||
import core.crypto.sha256
|
import core.crypto.sha256
|
||||||
import core.node.TimestamperNodeService
|
import core.node.TimestamperNodeService
|
||||||
import core.utilities.loggerFor
|
import core.utilities.loggerFor
|
||||||
import java.security.KeyPair
|
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.Executor
|
import java.util.concurrent.Executor
|
||||||
@ -188,11 +187,11 @@ class InMemoryNetwork {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun stop() {
|
override fun stop() {
|
||||||
running = false
|
|
||||||
if (backgroundThread != null) {
|
if (backgroundThread != null) {
|
||||||
backgroundThread.interrupt()
|
backgroundThread.interrupt()
|
||||||
backgroundThread.join()
|
backgroundThread.join()
|
||||||
}
|
}
|
||||||
|
running = false
|
||||||
netNodeHasShutdown(handle)
|
netNodeHasShutdown(handle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user