diff --git a/node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt b/node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt index 3d8e96945b..3bdf57e889 100644 --- a/node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt +++ b/node/src/main/kotlin/net/corda/node/services/config/NodeConfiguration.kt @@ -47,8 +47,7 @@ data class DatabaseConfig( val initDatabase: Boolean = true, val serverNameTablePrefix: String = "", val transactionIsolationLevel: TransactionIsolationLevel = TransactionIsolationLevel.REPEATABLE_READ, - val schema: String? = null, - val nodeOrganizationName: String? = null + val schema: String? = null ) enum class TransactionIsolationLevel { diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/NodeTestUtils.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/NodeTestUtils.kt index 1e24380d5b..012116f961 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/NodeTestUtils.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/NodeTestUtils.kt @@ -18,7 +18,6 @@ import net.corda.core.utilities.getOrThrow import net.corda.core.utilities.seconds import net.corda.node.services.api.StartedNodeServices import net.corda.node.services.config.CertChainPolicyConfig -import net.corda.node.services.config.DatabaseConfig import net.corda.node.services.config.NodeConfiguration import net.corda.node.services.config.VerifierType import net.corda.nodeapi.User diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt index d9b128420d..3c80a84870 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockNode.kt @@ -27,7 +27,6 @@ import net.corda.node.internal.StartedNode import net.corda.node.internal.cordapp.CordappLoader import net.corda.node.services.api.SchemaService import net.corda.node.services.config.BFTSMaRtConfiguration -import net.corda.node.services.config.DatabaseConfig import net.corda.node.services.config.NodeConfiguration import net.corda.node.services.config.NotaryConfig import net.corda.node.services.keys.E2ETestKeyManagementService diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt index 5459048a4e..ac9edec4fe 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/MockServices.kt @@ -109,8 +109,10 @@ open class MockServices( * @param nodeName Reflects the "instance" of the in-memory database or database username/schema. */ @JvmStatic - fun makeTestDatabaseProperties(nodeName: String? = null): DatabaseConfig = - DatabaseConfig(nodeOrganizationName = nodeName) + fun makeTestDatabaseProperties(nodeName: String? = null): DatabaseConfig { + val config = readDatabaseConfig(nodeName) + return DatabaseConfig(schema = if (config.hasPath("database.schema")) config.getString("database.schema") else "") + } /** * Creates an instance of [InMemoryIdentityService] with [MOCK_IDENTITIES]. @@ -145,7 +147,7 @@ open class MockServices( initialIdentityName: CordaX500Name): Pair { val cordappLoader = CordappLoader.createWithTestPackages(cordappPackages) val dataSourceProps = makeTestDataSourceProperties() - val database = configureDatabase(dataSourceProps, DatabaseConfig(), identityService, NodeSchemaService(cordappLoader)) + val database = configureDatabase(dataSourceProps, makeTestDatabaseProperties(), identityService, NodeSchemaService(cordappLoader)) val mockService = database.transaction { object : MockServices(cordappLoader, initialIdentityName = initialIdentityName, keys = *(keys.toTypedArray())) { override val identityService get() = identityService