diff --git a/node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt b/node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt index 40393125e1..eb47c8cb19 100644 --- a/node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt +++ b/node/src/main/kotlin/net/corda/node/services/config/ConfigUtilities.kt @@ -6,8 +6,8 @@ import net.corda.core.crypto.SignatureScheme import net.corda.core.identity.CordaX500Name import net.corda.core.internal.* import net.corda.nodeapi.internal.config.SSLConfiguration +import net.corda.nodeapi.internal.config.toProperties import net.corda.nodeapi.internal.crypto.* -import net.corda.nodeapi.config.toProperties import org.bouncycastle.asn1.x509.GeneralName import org.bouncycastle.asn1.x509.GeneralSubtree import org.bouncycastle.asn1.x509.NameConstraints diff --git a/perftestcordapp/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/CommercialPaperTests.kt b/perftestcordapp/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/CommercialPaperTests.kt index e94ec7e72f..455d2ee71e 100644 --- a/perftestcordapp/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/CommercialPaperTests.kt +++ b/perftestcordapp/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/CommercialPaperTests.kt @@ -14,6 +14,7 @@ import net.corda.core.utilities.days import net.corda.core.utilities.seconds import net.corda.testing.* import net.corda.testing.node.MockServices +import net.corda.testing.node.makeTestIdentityService import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -216,7 +217,10 @@ class CommercialPaperTestsGeneric { // @Test fun `issue move and then redeem`() = withTestSerialization{ - val aliceDatabaseAndServices = MockServices.makeTestDatabaseAndMockServices(keys = listOf(ALICE_KEY)) + val aliceDatabaseAndServices = MockServices.makeTestDatabaseAndMockServices( + listOf(ALICE_KEY), + makeTestIdentityService(listOf(MEGA_CORP_IDENTITY, MINI_CORP_IDENTITY, DUMMY_CASH_ISSUER_IDENTITY, DUMMY_NOTARY_IDENTITY)), + initialIdentityName = MEGA_CORP.name) val databaseAlice = aliceDatabaseAndServices.first aliceServices = aliceDatabaseAndServices.second aliceVaultService = aliceServices.vaultService @@ -226,7 +230,10 @@ class CommercialPaperTestsGeneric { aliceVaultService = aliceServices.vaultService } - val bigCorpDatabaseAndServices = MockServices.makeTestDatabaseAndMockServices(keys = listOf(BIG_CORP_KEY)) + val bigCorpDatabaseAndServices = MockServices.makeTestDatabaseAndMockServices( + listOf(BIG_CORP_KEY), + makeTestIdentityService(listOf(MEGA_CORP_IDENTITY, MINI_CORP_IDENTITY, DUMMY_CASH_ISSUER_IDENTITY, DUMMY_NOTARY_IDENTITY)), + initialIdentityName = MEGA_CORP.name) val databaseBigCorp = bigCorpDatabaseAndServices.first bigCorpServices = bigCorpDatabaseAndServices.second bigCorpVaultService = bigCorpServices.vaultService diff --git a/perftestcordapp/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/CashTests.kt b/perftestcordapp/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/CashTests.kt index bdef97ea64..348929124c 100644 --- a/perftestcordapp/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/CashTests.kt +++ b/perftestcordapp/src/test/kotlin/com/r3/corda/enterprise/perftestcordapp/contracts/asset/CashTests.kt @@ -28,6 +28,7 @@ import net.corda.testing.contracts.DummyState import net.corda.testing.contracts.VaultFiller.Companion.calculateRandomlySizedAmounts import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices.Companion.makeTestDatabaseAndMockServices +import net.corda.testing.node.makeTestIdentityService import org.junit.After import org.junit.Before import org.junit.Test @@ -104,7 +105,11 @@ class CashTests { fun setUp() = withTestSerialization { LogHelper.setLevel(NodeVaultService::class) megaCorpServices = MockServices(listOf("com.r3.corda.enterprise.perftestcordapp.contracts.asset","com.r3.corda.enterprise.perftestcordapp.schemas"), MEGA_CORP.name, MEGA_CORP_KEY) - val databaseAndServices = makeTestDatabaseAndMockServices(cordappPackages = listOf("com.r3.corda.enterprise.perftestcordapp.contracts.asset","com.r3.corda.enterprise.perftestcordapp.schemas"), keys = listOf(MINI_CORP_KEY, MEGA_CORP_KEY, OUR_KEY)) + val databaseAndServices = makeTestDatabaseAndMockServices( + listOf(MINI_CORP_KEY, MEGA_CORP_KEY, OUR_KEY), + makeTestIdentityService(listOf(MEGA_CORP_IDENTITY, MINI_CORP_IDENTITY, DUMMY_CASH_ISSUER_IDENTITY, DUMMY_NOTARY_IDENTITY)), + listOf("com.r3.corda.enterprise.perftestcordapp.contracts.asset", "com.r3.corda.enterprise.perftestcordapp.schemas"), + CordaX500Name("Me", "London", "GB")) database = databaseAndServices.first miniCorpServices = databaseAndServices.second 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 d9f423bc81..e96340e1a8 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 @@ -16,9 +16,7 @@ import net.corda.core.transactions.TransactionBuilder 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.NodeConfiguration -import net.corda.node.services.config.VerifierType +import net.corda.node.services.config.* import net.corda.nodeapi.internal.config.User import net.corda.testing.node.MockServices import net.corda.testing.node.MockServices.Companion.makeTestDataSourceProperties @@ -73,6 +71,7 @@ fun testNodeConfiguration( doReturn(5).whenever(it).messageRedeliveryDelaySeconds doReturn(5.seconds.toMillis()).whenever(it).additionalNodeInfoPollingFrequencyMsec doReturn(null).whenever(it).devModeOptions + doReturn(EnterpriseConfiguration(MutualExclusionConfiguration(false, "", 20000, 40000))).whenever(it).enterpriseConfiguration //Enterprise only } } 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 5dd84d0273..f645788216 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 @@ -21,7 +21,6 @@ import net.corda.core.serialization.SingletonSerializeAsToken import net.corda.core.toFuture import net.corda.core.transactions.SignedTransaction import net.corda.node.VersionInfo -import net.corda.node.internal.StateLoaderImpl import net.corda.node.internal.configureDatabase import net.corda.node.internal.cordapp.CordappLoader import net.corda.node.services.api.SchemaService diff --git a/tools/jmeter/src/test/kotlin/com/r3/corda/jmeter/StartLocalPerfCorDapp.kt b/tools/jmeter/src/test/kotlin/com/r3/corda/jmeter/StartLocalPerfCorDapp.kt index 359398d44f..397cb0ba4e 100644 --- a/tools/jmeter/src/test/kotlin/com/r3/corda/jmeter/StartLocalPerfCorDapp.kt +++ b/tools/jmeter/src/test/kotlin/com/r3/corda/jmeter/StartLocalPerfCorDapp.kt @@ -1,7 +1,8 @@ package com.r3.corda.jmeter import net.corda.core.utilities.getOrThrow -import net.corda.nodeapi.User +import net.corda.node.services.Permissions +import net.corda.nodeapi.internal.config.User import net.corda.testing.DUMMY_NOTARY import net.corda.testing.node.NotarySpec import java.io.BufferedReader @@ -12,7 +13,7 @@ class StartLocalPerfCorDapp { @JvmStatic fun main(args: Array) { // Typically the RPC port of Bank A is 10004. - val demoUser = User("perf", "perf", setOf(net.corda.node.services.Permissions.Companion.all())) + val demoUser = User("perf", "perf", setOf(Permissions.all())) net.corda.testing.driver.driver(startNodesInProcess = false, waitForAllNodesToFinish = true, notarySpecs = listOf(NotarySpec(DUMMY_NOTARY.name, validating = false)),