mirror of
https://github.com/corda/corda.git
synced 2025-02-05 02:29:20 +00:00
Modify Node to allow alternative DJVM configurations for testing.
This commit is contained in:
parent
e7997e6546
commit
ea6db636fb
@ -102,7 +102,9 @@ open class Node(configuration: NodeConfiguration,
|
|||||||
versionInfo: VersionInfo,
|
versionInfo: VersionInfo,
|
||||||
private val initialiseSerialization: Boolean = true,
|
private val initialiseSerialization: Boolean = true,
|
||||||
flowManager: FlowManager = NodeFlowManager(configuration.flowOverrides),
|
flowManager: FlowManager = NodeFlowManager(configuration.flowOverrides),
|
||||||
cacheFactoryPrototype: BindableNamedCacheFactory = DefaultNamedCacheFactory()
|
cacheFactoryPrototype: BindableNamedCacheFactory = DefaultNamedCacheFactory(),
|
||||||
|
djvmBootstrapSource: ApiSource = createBootstrapSource(configuration),
|
||||||
|
djvmCordaSource: UserSource? = createDeterministicClasspath(configuration)
|
||||||
) : AbstractNode<NodeInfo>(
|
) : AbstractNode<NodeInfo>(
|
||||||
configuration,
|
configuration,
|
||||||
createClock(configuration),
|
createClock(configuration),
|
||||||
@ -111,8 +113,8 @@ open class Node(configuration: NodeConfiguration,
|
|||||||
flowManager,
|
flowManager,
|
||||||
// Under normal (non-test execution) it will always be "1"
|
// Under normal (non-test execution) it will always be "1"
|
||||||
AffinityExecutor.ServiceAffinityExecutor("Node thread-${sameVmNodeCounter.incrementAndGet()}", 1),
|
AffinityExecutor.ServiceAffinityExecutor("Node thread-${sameVmNodeCounter.incrementAndGet()}", 1),
|
||||||
djvmBootstrapSource = createBootstrapSource(configuration),
|
djvmBootstrapSource = djvmBootstrapSource,
|
||||||
djvmCordaSource = createDeterministicClasspath(configuration)
|
djvmCordaSource = djvmCordaSource
|
||||||
) {
|
) {
|
||||||
|
|
||||||
override fun createStartedNode(nodeInfo: NodeInfo, rpcOps: CordaRPCOps, notaryService: NotaryService?): NodeInfo =
|
override fun createStartedNode(nodeInfo: NodeInfo, rpcOps: CordaRPCOps, notaryService: NotaryService?): NodeInfo =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user