Mercurial > hg > Database > Alice
changeset 644:e0621f645e2e
add local topology test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Dec 2017 09:59:59 +0900 |
parents | 74dbb8809c73 |
children | cb16036404ba |
files | src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java src/main/java/alice/test/topology/localTestTopology/LocalTestTopologyConfig.java |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java Sun Dec 31 09:51:24 2017 +0900 +++ b/src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java Sun Dec 31 09:59:59 2017 +0900 @@ -12,17 +12,18 @@ public static void main(String[] args) { LinkedList<LocalTestTopologyConfig> configs = new LinkedList<LocalTestTopologyConfig>(); int port = 10000; + int toplogyManagerPort = port++; configs.add(new LocalTestTopologyConfig(args, port++, "remote1")); configs.add(new LocalTestTopologyConfig(args, port++, "remote2")); configs.add(new LocalTestTopologyConfig(args, port++, "remote3")); - TopologyManagerConfig topologyManagerConfigconf = new TopologyManagerConfig(args); - new AliceDaemon(topologyManagerConfigconf).listen(); - new StartTopologyManager(topologyManagerConfigconf).execute(); + TopologyManagerConfig topologyManagerConfig = new TopologyManagerConfig(args); + new AliceDaemon(topologyManagerConfig).listen(); + new StartTopologyManager(topologyManagerConfig).execute(); for (LocalTestTopologyConfig conf: configs ) { new AliceDaemon(conf).listen(); - DataSegment.connect(conf.key, "rev" + conf.key, conf.hostname, conf.connectPort); + DataSegment.connect(conf.key, "rev" + conf.key, conf.hostname, toplogyManagerPort); } new LTopologyStartCodeSegment(configs).execute(); }
--- a/src/main/java/alice/test/topology/localTestTopology/LocalTestTopologyConfig.java Sun Dec 31 09:51:24 2017 +0900 +++ b/src/main/java/alice/test/topology/localTestTopology/LocalTestTopologyConfig.java Sun Dec 31 09:59:59 2017 +0900 @@ -12,6 +12,7 @@ super(args); hostname = "127.0.0.1"; connectPort = port; + localPort = port; key = dsmName; }