mirror of
https://github.com/corda/corda.git
synced 2025-03-17 17:45:17 +00:00
Close DB after test
Add unique node prefix to DB source
This commit is contained in:
parent
597a15a230
commit
29615f512e
@ -122,6 +122,11 @@ open class VaultQueryTests {
|
||||
services.identityService.verifyAndRegisterIdentity(identity)
|
||||
}
|
||||
}
|
||||
|
||||
@AfterClass @JvmStatic
|
||||
fun afterClass() {
|
||||
database.close()
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var transaction: DatabaseTransaction
|
||||
|
@ -117,7 +117,7 @@ open class MockServices private constructor(
|
||||
networkParameters: NetworkParameters = testNetworkParameters(),
|
||||
vararg moreKeys: KeyPair): Pair<CordaPersistence, MockServices> {
|
||||
val cordappLoader = CordappLoader.createWithTestPackages(cordappPackages)
|
||||
val dataSourceProps = makeTestDataSourceProperties(initialIdentity.name.organisation)
|
||||
val dataSourceProps = makeTestDataSourceProperties(initialIdentity.name.organisation, SecureHash.randomSHA256().toString())
|
||||
val schemaService = NodeSchemaService(cordappLoader.cordappSchemas)
|
||||
val database = configureDatabase(dataSourceProps, makeTestDatabaseProperties(initialIdentity.name.organisation), identityService, schemaService)
|
||||
val mockService = database.transaction {
|
||||
|
Loading…
x
Reference in New Issue
Block a user