From f7c654bc65d104b40e3edc456f0f6ca67be51861 Mon Sep 17 00:00:00 2001
From: Adel El-Beik <adel.el-beik@r3.com>
Date: Tue, 7 Mar 2023 13:30:10 +0000
Subject: [PATCH] NOTICK: Resolved Kotlin api change.

---
 .../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<Path>,
             environmentVariables: Map<String, String>,
             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<String, String>,
+            useTestClock: Boolean,
+            startNodesInProcess: Boolean,
+            waitForAllNodesToFinish: Boolean,
+            notarySpecs: List<NotarySpec>,
+            extraCordappPackagesToScan: List<String>,
+            jmxPolicy: JmxPolicy,
+            networkParameters: NetworkParameters,
+            notaryCustomOverrides: Map<String, Any?>,
+            inMemoryDB: Boolean,
+            cordappsForAllNodes: Collection<TestCordapp>?,
+            djvmBootstrapSource: Path?,
+            djvmCordaSource: List<Path>,
+            environmentVariables: Map<String, String>,
+            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