Fix merge

This commit is contained in:
Tudor Malene 2018-05-14 17:17:48 +01:00 committed by tudor.malene@gmail.com
parent ec20359518
commit a1616767b8
3 changed files with 75 additions and 9 deletions

View File

@ -95,11 +95,12 @@ class NetworkParametersUpdateTest : IntegrationTest() {
compatibilityZone = compatibilityZone,
notarySpecs = emptyList(),
initialiseSerialization = false,
extraCordappPackagesToScan = listOf("net.corda.finance")
extraCordappPackagesToScan = listOf("net.corda.finance"),
notaryCustomOverrides = mapOf("devMode" to false)
) {
var (alice, bob) = listOf(
startNode(providedName = ALICE_NAME),
startNode(providedName = BOB_NAME)
startNode(providedName = ALICE_NAME, customOverrides = mapOf("devMode" to false)),
startNode(providedName = BOB_NAME, customOverrides = mapOf("devMode" to false))
).map { it.getOrThrow() as NodeHandleInternal }
// Make sure that stopping Bob doesn't remove him from the network map
@ -139,7 +140,7 @@ class NetworkParametersUpdateTest : IntegrationTest() {
applyNetworkParametersAndStart(NetworkParametersCmd.FlagDay)
alice.stop()
alice = startNode(providedName = ALICE_NAME).getOrThrow() as NodeHandleInternal
alice = startNode(providedName = ALICE_NAME, customOverrides = mapOf("devMode" to false)).getOrThrow() as NodeHandleInternal
// TODO It is also possible to check what version of parameters node runs by writing flow that reads that value from ServiceHub
val networkParameters = (alice.configuration.baseDirectory / NETWORK_PARAMS_FILE_NAME)

View File

@ -130,17 +130,18 @@ class NodeRegistrationTest : IntegrationTest() {
compatibilityZone = compatibilityZone,
initialiseSerialization = false,
notarySpecs = listOf(NotarySpec(notaryName)),
extraCordappPackagesToScan = listOf("net.corda.finance")
extraCordappPackagesToScan = listOf("net.corda.finance"),
notaryCustomOverrides = mapOf("devMode" to false)
) {
val (alice, notary) = listOf(
startNode(providedName = aliceName),
startNode(providedName = aliceName, customOverrides = mapOf("devMode" to false)),
defaultNotaryNode
).map { it.getOrThrow() as NodeHandleInternal }
alice.onlySeesFromNetworkMap(alice, notary)
notary.onlySeesFromNetworkMap(alice, notary)
val genevieve = startNode(providedName = genevieveName).getOrThrow() as NodeHandleInternal
val genevieve = startNode(providedName = genevieveName, customOverrides = mapOf("devMode" to false)).getOrThrow() as NodeHandleInternal
// Wait for the nodes to poll again
Thread.sleep(timeoutMillis * 2)

View File

@ -289,7 +289,39 @@ data class DriverParameters(
notarySpecs,
extraCordappPackagesToScan,
jmxPolicy,
networkParameters, emptyMap()
networkParameters,
emptyMap()
)
constructor(
isDebug: Boolean,
driverDirectory: Path,
portAllocation: PortAllocation,
debugPortAllocation: PortAllocation,
systemProperties: Map<String, String>,
useTestClock: Boolean,
initialiseSerialization: Boolean,
startNodesInProcess: Boolean,
waitForAllNodesToFinish: Boolean,
notarySpecs: List<NotarySpec>,
extraCordappPackagesToScan: List<String>,
jmxPolicy: JmxPolicy,
networkParameters: NetworkParameters
) : this(
isDebug,
driverDirectory,
portAllocation,
debugPortAllocation,
systemProperties,
useTestClock,
initialiseSerialization,
startNodesInProcess,
waitForAllNodesToFinish,
notarySpecs,
extraCordappPackagesToScan,
jmxPolicy,
networkParameters,
emptyMap()
)
fun withIsDebug(isDebug: Boolean): DriverParameters = copy(isDebug = isDebug)
@ -333,6 +365,38 @@ data class DriverParameters(
notarySpecs,
extraCordappPackagesToScan,
jmxPolicy,
networkParameters, emptyMap()
networkParameters,
emptyMap()
)
fun copy(
isDebug: Boolean,
driverDirectory: Path,
portAllocation: PortAllocation,
debugPortAllocation: PortAllocation,
systemProperties: Map<String, String>,
useTestClock: Boolean,
initialiseSerialization: Boolean,
startNodesInProcess: Boolean,
waitForAllNodesToFinish: Boolean,
notarySpecs: List<NotarySpec>,
extraCordappPackagesToScan: List<String>,
jmxPolicy: JmxPolicy,
networkParameters: NetworkParameters
) = this.copy(
isDebug,
driverDirectory,
portAllocation,
debugPortAllocation,
systemProperties,
useTestClock,
initialiseSerialization,
startNodesInProcess,
waitForAllNodesToFinish,
notarySpecs,
extraCordappPackagesToScan,
jmxPolicy,
networkParameters,
emptyMap()
)
}