The bridge HA configuration string was meant to be URL like. Correct the typo in this from zk//: to zk://

This commit is contained in:
Matthew Nesbit 2018-05-02 14:36:02 +01:00
parent a5e2058a5b
commit 94bb3bd0bf
4 changed files with 6 additions and 6 deletions

View File

@ -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"

View File

@ -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()

View File

@ -16,5 +16,5 @@ inboundConfig : {
}
networkParametersPath = network-parameters
haConfig : {
haConnectionString = "zk//:localhost:11105"
haConnectionString = "zk://localhost:11105,zk://localhost:11106"
}

View File

@ -17,5 +17,5 @@ floatInnerConfig : {
}
networkParametersPath = network-parameters
haConfig : {
haConnectionString = "zk//:localhost:11105"
haConnectionString = "zk://localhost:11105"
}