From 94bb3bd0bf48b2bc9580fb189d333b4fe0d439c4 Mon Sep 17 00:00:00 2001 From: Matthew Nesbit Date: Wed, 2 May 2018 14:36:02 +0100 Subject: [PATCH] The bridge HA configuration string was meant to be URL like. Correct the typo in this from zk//: to zk:// --- .../kotlin/net/corda/bridge/BridgeIntegrationTest.kt | 4 ++-- .../corda/bridge/services/ha/ExternalMasterElectionService.kt | 4 ++-- .../resources/net/corda/bridge/hasingleprocess/bridge.conf | 2 +- .../resources/net/corda/bridge/hawithfloat/bridge/bridge.conf | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bridge/src/integration-test/kotlin/net/corda/bridge/BridgeIntegrationTest.kt b/bridge/src/integration-test/kotlin/net/corda/bridge/BridgeIntegrationTest.kt index 5437f1ac16..2735a32dd6 100644 --- a/bridge/src/integration-test/kotlin/net/corda/bridge/BridgeIntegrationTest.kt +++ b/bridge/src/integration-test/kotlin/net/corda/bridge/BridgeIntegrationTest.kt @@ -143,7 +143,7 @@ class BridgeIntegrationTest { val configResource = "/net/corda/bridge/hasingleprocess/bridge.conf" createNetworkParams(tempFolder.root.toPath()) val config = createAndLoadConfigFromResource(tempFolder.root.toPath(), configResource) - assertEquals(BridgeHAConfigImpl("zk//:localhost:11105", 10), config.haConfig) + assertEquals(BridgeHAConfigImpl("zk://localhost:11105,zk://localhost:11106", 10), config.haConfig) config.createBridgeKeyStores(DUMMY_BANK_A_NAME) val (artemisServer, artemisClient) = createArtemis() val zkServer = TestingServer(11105, false) @@ -192,7 +192,7 @@ class BridgeIntegrationTest { val bridgeFolder = tempFolder.root.toPath() val bridgeConfigResource = "/net/corda/bridge/hawithfloat/bridge/bridge.conf" val bridgeConfig = createAndLoadConfigFromResource(bridgeFolder, bridgeConfigResource) - assertEquals(BridgeHAConfigImpl("zk//:localhost:11105", 10), bridgeConfig.haConfig) + assertEquals(BridgeHAConfigImpl("zk://localhost:11105", 10), bridgeConfig.haConfig) bridgeConfig.createBridgeKeyStores(DUMMY_BANK_A_NAME) createNetworkParams(bridgeFolder) val floatFolder = tempFolder.root.toPath() / "float" diff --git a/bridge/src/main/kotlin/net/corda/bridge/services/ha/ExternalMasterElectionService.kt b/bridge/src/main/kotlin/net/corda/bridge/services/ha/ExternalMasterElectionService.kt index b7183d5224..f9a2afedb2 100644 --- a/bridge/src/main/kotlin/net/corda/bridge/services/ha/ExternalMasterElectionService.kt +++ b/bridge/src/main/kotlin/net/corda/bridge/services/ha/ExternalMasterElectionService.kt @@ -35,11 +35,11 @@ class ExternalMasterElectionService(val conf: BridgeConfiguration, init { require(conf.haConfig != null) { "Undefined HA Config" } - require(conf.haConfig!!.haConnectionString.split(',').all { it.startsWith("zk//:") }) { "Only Zookeeper HA mode 'zk//:IPADDR:PORT supported" } + require(conf.haConfig!!.haConnectionString.split(',').all { it.startsWith("zk://") }) { "Only Zookeeper HA mode 'zk://IPADDR:PORT supported" } } override fun start() { - val zkConf = conf.haConfig!!.haConnectionString.split(',').map { it.replace("zk//:", "") }.joinToString(",") + val zkConf = conf.haConfig!!.haConnectionString.split(',').map { it.replace("zk://", "") }.joinToString(",") val leaderPriority = conf.haConfig!!.haPriority val hostName: String = InetAddress.getLocalHost().hostName val info = ManagementFactory.getRuntimeMXBean() diff --git a/bridge/src/test/resources/net/corda/bridge/hasingleprocess/bridge.conf b/bridge/src/test/resources/net/corda/bridge/hasingleprocess/bridge.conf index d19f06b46c..500e830601 100644 --- a/bridge/src/test/resources/net/corda/bridge/hasingleprocess/bridge.conf +++ b/bridge/src/test/resources/net/corda/bridge/hasingleprocess/bridge.conf @@ -16,5 +16,5 @@ inboundConfig : { } networkParametersPath = network-parameters haConfig : { - haConnectionString = "zk//:localhost:11105" + haConnectionString = "zk://localhost:11105,zk://localhost:11106" } \ No newline at end of file diff --git a/bridge/src/test/resources/net/corda/bridge/hawithfloat/bridge/bridge.conf b/bridge/src/test/resources/net/corda/bridge/hawithfloat/bridge/bridge.conf index e48066f465..37a401f0b7 100644 --- a/bridge/src/test/resources/net/corda/bridge/hawithfloat/bridge/bridge.conf +++ b/bridge/src/test/resources/net/corda/bridge/hawithfloat/bridge/bridge.conf @@ -17,5 +17,5 @@ floatInnerConfig : { } networkParametersPath = network-parameters haConfig : { - haConnectionString = "zk//:localhost:11105" + haConnectionString = "zk://localhost:11105" } \ No newline at end of file