Merge remote-tracking branch 'remotes/origin/tudor_merge_14_05_2018' into merges/may-14-15-21

# Conflicts:
#	testing/node-driver/src/main/kotlin/net/corda/testing/driver/Driver.kt
This commit is contained in:
sollecitom 2018-05-14 17:19:51 +01:00
commit dc1bf3ad34
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

@ -287,7 +287,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)
@ -331,6 +363,38 @@ data class DriverParameters(
notarySpecs = notarySpecs,
extraCordappPackagesToScan = extraCordappPackagesToScan,
jmxPolicy = jmxPolicy,
networkParameters = networkParameters, notaryCustomOverrides = emptyMap()
networkParameters = networkParameters,
notaryCustomOverrides = 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 = isDebug,
driverDirectory = driverDirectory,
portAllocation = portAllocation,
debugPortAllocation = debugPortAllocation,
systemProperties = systemProperties,
useTestClock = useTestClock,
initialiseSerialization = initialiseSerialization,
startNodesInProcess = startNodesInProcess,
waitForAllNodesToFinish = waitForAllNodesToFinish,
notarySpecs = notarySpecs,
extraCordappPackagesToScan = extraCordappPackagesToScan,
jmxPolicy = jmxPolicy,
networkParameters = networkParameters,
notaryCustomOverrides = emptyMap()
)
}