From ec67e77c7607b13ae01a1ff84a779346c69c69cc Mon Sep 17 00:00:00 2001 From: Adel El-Beik Date: Tue, 7 Mar 2023 18:18:37 +0000 Subject: [PATCH] ENT-9476: Added in missing Kotlin API. --- .../kotlin/net/corda/testing/driver/Driver.kt | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt index c17b8c3076..c0f0e6a120 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt @@ -489,7 +489,7 @@ data class DriverParameters( djvmCordaSource: List, environmentVariables: Map, allowHibernateToManageAppSchema: Boolean, - premigrateH2Database: Boolean + premigrateH2Database: Boolean = true ) : this( isDebug, driverDirectory, @@ -682,4 +682,50 @@ data class DriverParameters( allowHibernateToManageAppSchema = allowHibernateToManageAppSchema, premigrateH2Database = true ) + + @Suppress("LongParameterList") + fun copy( + isDebug: Boolean, + driverDirectory: Path, + portAllocation: PortAllocation, + debugPortAllocation: PortAllocation, + systemProperties: Map, + useTestClock: Boolean, + startNodesInProcess: Boolean, + waitForAllNodesToFinish: Boolean, + notarySpecs: List, + extraCordappPackagesToScan: List, + jmxPolicy: JmxPolicy, + networkParameters: NetworkParameters, + notaryCustomOverrides: Map, + inMemoryDB: Boolean, + cordappsForAllNodes: Collection?, + djvmBootstrapSource: Path?, + djvmCordaSource: List, + environmentVariables: Map, + allowHibernateToManageAppSchema: Boolean, + premigrateH2Database: Boolean + ) = this.copy( + isDebug = isDebug, + driverDirectory = driverDirectory, + portAllocation = portAllocation, + debugPortAllocation = debugPortAllocation, + systemProperties = systemProperties, + useTestClock = useTestClock, + startNodesInProcess = startNodesInProcess, + waitForAllNodesToFinish = waitForAllNodesToFinish, + notarySpecs = notarySpecs, + extraCordappPackagesToScan = extraCordappPackagesToScan, + jmxPolicy = jmxPolicy, + networkParameters = networkParameters, + notaryCustomOverrides = notaryCustomOverrides, + inMemoryDB = inMemoryDB, + cordappsForAllNodes = cordappsForAllNodes, + djvmBootstrapSource = djvmBootstrapSource, + djvmCordaSource = djvmCordaSource, + environmentVariables = environmentVariables, + allowHibernateToManageAppSchema = allowHibernateToManageAppSchema, + premigrateH2Database = premigrateH2Database, + notaryHandleTimeout = Duration.ofMinutes(1) + ) } \ No newline at end of file