mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Mocknetwork remove hibernate sessions on stop
This commit is contained in:
parent
d27aa0e685
commit
eece1e923c
@ -101,6 +101,7 @@ dependencies {
|
||||
}
|
||||
|
||||
implementation "co.paralleluniverse:quasar-core:$quasar_version"
|
||||
implementation "org.hibernate:hibernate-core:$hibernate_version"
|
||||
}
|
||||
|
||||
compileJava {
|
||||
|
@ -83,6 +83,7 @@ import java.time.Clock
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
import org.hibernate.internal.SessionFactoryRegistry
|
||||
import kotlin.io.path.createDirectories
|
||||
import kotlin.io.path.deleteIfExists
|
||||
import kotlin.io.path.div
|
||||
@ -620,6 +621,7 @@ open class InternalMockNetwork(cordappPackages: List<String> = emptyList(),
|
||||
}
|
||||
messagingNetwork.stop()
|
||||
}
|
||||
SessionFactoryRegistry.INSTANCE.clearRegistrations()
|
||||
}
|
||||
|
||||
/** Block until all scheduled activity, active flows and network activity has ceased. */
|
||||
|
Loading…
Reference in New Issue
Block a user