DriverParameters

data class DriverParameters(val isDebug: Boolean = false, val driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), val portAllocation: PortAllocation = incrementalPortAllocation(), val debugPortAllocation: PortAllocation = incrementalPortAllocation(), val systemProperties: Map<String, String> = emptyMap(), val useTestClock: Boolean = false, val startNodesInProcess: Boolean = false, val waitForAllNodesToFinish: Boolean = false, val notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), val extraCordappPackagesToScan: List<String> = listOf("migration"), val jmxPolicy: JmxPolicy = JmxPolicy(), val networkParameters: <Error class: unknown class> = testNetworkParameters(notaries = emptyList()), val notaryCustomOverrides: Map<String, Any?> = emptyMap(), val inMemoryDB: Boolean = false, val cordappsForAllNodes: Collection<TestCordapp>? = null, val enableSNI: Boolean = true, val environmentVariables: Map<String, String> = emptyMap(), val allowHibernateToManageAppSchema: Boolean = true, val premigrateH2Database: Boolean = true, val notaryHandleTimeout: Duration = Duration.ofMinutes(2))

Builder for configuring a driver.

Constructors

Link copied to clipboard
constructor(cordappsForAllNodes: Collection<TestCordapp>)
constructor(isDebug: Boolean = false, driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), portAllocation: PortAllocation = incrementalPortAllocation(), debugPortAllocation: PortAllocation = incrementalPortAllocation(), systemProperties: Map<String, String> = emptyMap(), useTestClock: Boolean = false, startNodesInProcess: Boolean = false, waitForAllNodesToFinish: Boolean = false, notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), extraCordappPackagesToScan: List<String> = listOf("migration"), jmxPolicy: JmxPolicy = JmxPolicy(), networkParameters: <Error class: unknown class> = testNetworkParameters(notaries = emptyList()), notaryCustomOverrides: Map<String, Any?> = emptyMap(), inMemoryDB: Boolean = true, cordappsForAllNodes: Collection<TestCordapp>? = null)
constructor(isDebug: Boolean = false, driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), portAllocation: PortAllocation = incrementalPortAllocation(), debugPortAllocation: PortAllocation = incrementalPortAllocation(), systemProperties: Map<String, String> = emptyMap(), useTestClock: Boolean = false, startNodesInProcess: Boolean = false, waitForAllNodesToFinish: Boolean = false, notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), extraCordappPackagesToScan: List<String> = listOf("migration"), jmxPolicy: JmxPolicy = JmxPolicy(), networkParameters: <Error class: unknown class> = testNetworkParameters(notaries = emptyList()), notaryCustomOverrides: Map<String, Any?> = emptyMap(), inMemoryDB: Boolean = true, cordappsForAllNodes: Collection<TestCordapp>? = null, enableSNI: Boolean = true)
constructor(isDebug: Boolean = false, driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), portAllocation: PortAllocation = incrementalPortAllocation(), debugPortAllocation: PortAllocation = incrementalPortAllocation(), systemProperties: Map<String, String> = emptyMap(), useTestClock: Boolean = false, startNodesInProcess: Boolean = false, waitForAllNodesToFinish: Boolean = false, notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), extraCordappPackagesToScan: List<String> = listOf("migration"), jmxPolicy: JmxPolicy = JmxPolicy(), networkParameters: <Error class: unknown class> = testNetworkParameters(notaries = emptyList()), notaryCustomOverrides: Map<String, Any?> = emptyMap(), inMemoryDB: Boolean = true)
constructor(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: <Error class: unknown class>)
constructor(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: <Error class: unknown class>, inMemoryDB: Boolean)
constructor(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: <Error class: unknown class>, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordapp>?, enableSNI: Boolean, environmentVariables: Map<String, String>, allowHibernateToManageAppSchema: Boolean = true)
constructor(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: <Error class: unknown class>, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordapp>?, enableSNI: Boolean, environmentVariables: Map<String, String>, allowHibernateToManageAppSchema: Boolean, premigrateH2Database: Boolean = true)
constructor(isDebug: Boolean = false, driverDirectory: Path = Paths.get("build") / "node-driver" / getTimestampAsDirectoryName(), portAllocation: PortAllocation = incrementalPortAllocation(), debugPortAllocation: PortAllocation = incrementalPortAllocation(), systemProperties: Map<String, String> = emptyMap(), useTestClock: Boolean = false, startNodesInProcess: Boolean = false, waitForAllNodesToFinish: Boolean = false, notarySpecs: List<NotarySpec> = listOf(NotarySpec(DUMMY_NOTARY_NAME)), extraCordappPackagesToScan: List<String> = listOf("migration"), jmxPolicy: JmxPolicy = JmxPolicy(), networkParameters: <Error class: unknown class> = testNetworkParameters(notaries = emptyList()), notaryCustomOverrides: Map<String, Any?> = emptyMap(), inMemoryDB: Boolean = false, cordappsForAllNodes: Collection<TestCordapp>? = null, enableSNI: Boolean = true, environmentVariables: Map<String, String> = emptyMap(), allowHibernateToManageAppSchema: Boolean = true, premigrateH2Database: Boolean = true, notaryHandleTimeout: Duration = Duration.ofMinutes(2))

Properties

Link copied to clipboard

TestCordapps that will be added to each node started by the DriverDSL.

Link copied to clipboard

The port allocation strategy to use for jvm debugging. Defaults to incremental.

Link copied to clipboard

The base directory node directories go into, defaults to "build//". The node directories themselves are "//", where legalName defaults to "-" and may be specified in DriverDSL.startNode.

Link copied to clipboard
val enableSNI: Boolean = true
Link copied to clipboard
Link copied to clipboard

A List of additional cordapp packages to scan for any cordapp code, e.g. contract verification code, flows and services. The calling package is automatically included in this list. If this is not desirable then use cordappsForAllNodes instead.

Link copied to clipboard
val inMemoryDB: Boolean = false

Whether to use in-memory H2 for new nodes rather then on-disk (the node starts quicker, however the data is not persisted between node restarts). Has no effect if node is configured in any way to use database other than H2.

Link copied to clipboard
val isDebug: Boolean = false

Indicates whether the spawned nodes should start in jdwt debug mode and have debug level logging.

Link copied to clipboard

Used to specify whether to expose JMX metrics via Jolokia HHTP/JSON.

Link copied to clipboard
val networkParameters: <Error class: unknown class>

The network parameters to be used by all the nodes. NetworkParameters.notaries must be empty as notaries are defined by notarySpecs.

Link copied to clipboard

Extra settings that need to be passed to the notary.

Link copied to clipboard

Specifies how long to wait to receive a notary handle. This waiting includes waiting for the notary to start. This can save time for tests which do not need to migrate from a blank schema.

Link copied to clipboard

The notaries advertised for this network. These nodes will be started automatically and will be available from DriverDSL.notaryHandles, and will be added automatically to the network parameters. Defaults to a simple validating notary.

Link copied to clipboard

The port allocation strategy to use for the messaging and the web server addresses. Defaults to incremental.

Link copied to clipboard

Whether to use a prebuilt H2 database schema or start from an empty schema.

Link copied to clipboard

Provides the default behaviour of whether new nodes should start inside this process or not. Note that this may be overridden in DriverDSL.startNode.

Link copied to clipboard

A Map of extra system properties which will be given to each new node. Defaults to empty.

Link copied to clipboard
val useTestClock: Boolean = false

If true the test clock will be used in Node.

Link copied to clipboard

If true, the nodes will not shut down automatically after executing the code in the driver DSL block. It will wait for them to be shut down externally instead.

Functions

Link copied to clipboard
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: <Error class: unknown class>): DriverParameters
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: <Error class: unknown class>, cordappsForAllNodes: Set<TestCordapp>?): DriverParameters
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: <Error class: unknown class>, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordapp>?): DriverParameters
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: <Error class: unknown class>, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordapp>?, enableSNI: Boolean): DriverParameters
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: <Error class: unknown class>, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordapp>?, enableSNI: Boolean, environmentVariables: Map<String, String>, allowHibernateToManageAppSchema: Boolean): DriverParameters
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: <Error class: unknown class>, notaryCustomOverrides: Map<String, Any?>, inMemoryDB: Boolean, cordappsForAllNodes: Collection<TestCordapp>?, enableSNI: Boolean, environmentVariables: Map<String, String>, allowHibernateToManageAppSchema: Boolean, premigrateH2Database: Boolean): DriverParameters
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun withExtraCordappPackagesToScan(extraCordappPackagesToScan: List<String>): DriverParameters
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun withNetworkParameters(networkParameters: <Error class: unknown class>): DriverParameters
Link copied to clipboard
fun withNotaryCustomOverrides(notaryCustomOverrides: Map<String, Any?>): DriverParameters
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard