Test driver default parameters removal (#2519) (#2525)

* Removed long parameter list in test driver, replaced with DriverParameters object

(cherry picked from commit b91dd43)
This commit is contained in:
Maksymilian Pawlak
2018-02-14 10:24:16 +00:00
committed by Katelyn Baker
parent 90c8b2a12a
commit b87ca85046
37 changed files with 116 additions and 148 deletions

View File

@ -7,6 +7,7 @@ import net.corda.node.services.Permissions.Companion.invokeRpc
import net.corda.node.services.Permissions.Companion.startFlow
import net.corda.testing.core.DUMMY_BANK_A_NAME
import net.corda.testing.core.DUMMY_BANK_B_NAME
import net.corda.testing.driver.DriverParameters
import net.corda.testing.node.User
import net.corda.testing.driver.PortAllocation
import net.corda.testing.driver.driver
@ -19,7 +20,7 @@ class AttachmentDemoTest {
@Test
fun `attachment demo using a 10MB zip file`() {
val numOfExpectedBytes = 10_000_000
driver(isDebug = true, portAllocation = PortAllocation.Incremental(20000)) {
driver(DriverParameters(isDebug = true, portAllocation = PortAllocation.Incremental(20000))) {
val demoUser = listOf(User("demo", "demo", setOf(
startFlow<AttachmentDemoFlow>(),
invokeRpc(CordaRPCOps::attachmentExists),

View File

@ -3,6 +3,7 @@ package net.corda.attachmentdemo
import net.corda.core.internal.div
import net.corda.testing.core.DUMMY_BANK_A_NAME
import net.corda.testing.core.DUMMY_BANK_B_NAME
import net.corda.testing.driver.DriverParameters
import net.corda.testing.node.User
import net.corda.testing.driver.driver
@ -12,7 +13,7 @@ import net.corda.testing.driver.driver
*/
fun main(args: Array<String>) {
val demoUser = listOf(User("demo", "demo", setOf("StartFlow.net.corda.flows.FinalityFlow")))
driver(isDebug = true, driverDirectory = "build" / "attachment-demo-nodes", waitForAllNodesToFinish = true) {
driver(DriverParameters(isDebug = true, driverDirectory = "build" / "attachment-demo-nodes", waitForAllNodesToFinish = true)) {
startNode(providedName = DUMMY_BANK_A_NAME, rpcUsers = demoUser)
startNode(providedName = DUMMY_BANK_B_NAME, rpcUsers = demoUser)
}