diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/network/NodeInfoFilesCopier.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/network/NodeInfoFilesCopier.kt index 717f22e2fb..e1c28a44f4 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/network/NodeInfoFilesCopier.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/network/NodeInfoFilesCopier.kt @@ -3,6 +3,7 @@ package net.corda.nodeapi.internal.network import net.corda.core.internal.* import net.corda.core.utilities.contextLogger import net.corda.core.internal.NODE_INFO_DIRECTORY +import net.corda.core.utilities.debug import rx.Observable import rx.Scheduler import rx.Subscription @@ -21,7 +22,7 @@ import java.util.concurrent.TimeUnit * This class will create paths that it needs to poll and to where it needs to copy files in case those * don't exist yet. */ -class NodeInfoFilesCopier(scheduler: Scheduler = Schedulers.io()) : AutoCloseable { +class NodeInfoFilesCopier(private val scheduler: Scheduler = Schedulers.io()) : AutoCloseable { companion object { private val log = contextLogger() @@ -122,6 +123,7 @@ class NodeInfoFilesCopier(scheduler: Scheduler = Schedulers.io()) : AutoCloseabl } private fun atomicCopy(source: Path, destination: Path) { + log.debug { "[${scheduler.now()}] Copying ... $source -> $destination" } val tempDestination = try { Files.createTempFile(destination.parent, "", null) } catch (exception: IOException) { diff --git a/node/src/main/kotlin/net/corda/node/services/network/NodeInfoWatcher.kt b/node/src/main/kotlin/net/corda/node/services/network/NodeInfoWatcher.kt index 9b4fb27cc5..98b4a4f4d6 100644 --- a/node/src/main/kotlin/net/corda/node/services/network/NodeInfoWatcher.kt +++ b/node/src/main/kotlin/net/corda/node/services/network/NodeInfoWatcher.kt @@ -78,9 +78,12 @@ class NodeInfoWatcher(private val nodePath: Path, } private fun pollDirectory(): List { + logger.debug { "pollDirectory $nodeInfosDir" } val processedPaths = HashSet() val result = nodeInfosDir.list { paths -> paths + .filter { logger.debug { "Examining $it" } + true} .filter { it.isRegularFile() } .filter { file -> val lastModifiedTime = file.lastModifiedTime() diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt index c20d3aa06b..f0f437080d 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/DriverDSLImpl.kt @@ -112,9 +112,6 @@ class DriverDSLImpl( private lateinit var _notaries: CordaFuture> override val notaryHandles: List get() = _notaries.getOrThrow() - // While starting with inProcess mode, we need to have different names to avoid clashes - private val inMemoryCounter = AtomicInteger() - interface Waitable { @Throws(InterruptedException::class) fun waitFor() @@ -239,7 +236,8 @@ class DriverDSLImpl( NodeConfiguration::useTestClock.name to useTestClock, NodeConfiguration::rpcUsers.name to if (users.isEmpty()) defaultRpcUserList else users.map { it.toConfig().root().unwrapped() }, NodeConfiguration::verifierType.name to parameters.verifierType.name, - NodeConfiguration::flowOverrides.name to flowOverrideConfig.toConfig().root().unwrapped() + NodeConfiguration::flowOverrides.name to flowOverrideConfig.toConfig().root().unwrapped(), + NodeConfiguration::additionalNodeInfoPollingFrequencyMsec.name to 1000 ) + czUrlConfig + jmxConfig + parameters.customOverrides val config = NodeConfig(ConfigHelper.loadConfig( baseDirectory = baseDirectory(name), @@ -678,6 +676,9 @@ class DriverDSLImpl( companion object { internal val log = contextLogger() + // While starting with inProcess mode, we need to have different names to avoid clashes + private val inMemoryCounter = AtomicInteger() + private val notaryHandleTimeout = Duration.ofMinutes(1) private val defaultRpcUserList = listOf(InternalUser("default", "default", setOf("ALL")).toConfig().root().unwrapped()) private val names = arrayOf(ALICE_NAME, BOB_NAME, DUMMY_BANK_A_NAME)