Mercurial > hg > Database > Alice
diff src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java @ 645:cb16036404ba
fix local topology test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Dec 2017 11:04:29 +0900 |
parents | e0621f645e2e |
children | 3c060de44c2e |
line wrap: on
line diff
--- a/src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java Sun Dec 31 09:59:59 2017 +0900 +++ b/src/main/java/alice/test/topology/localTestTopology/LocalTestTopology.java Sun Dec 31 11:04:29 2017 +0900 @@ -4,15 +4,17 @@ import alice.datasegment.DataSegment; import alice.topology.manager.StartTopologyManager; import alice.topology.manager.TopologyManagerConfig; +import alice.topology.node.StartTopologyNode; +import alice.topology.node.TopologyNodeConfig; import java.util.LinkedList; public class LocalTestTopology { + public static void main(String[] args) { LinkedList<LocalTestTopologyConfig> configs = new LinkedList<LocalTestTopologyConfig>(); - int port = 10000; - int toplogyManagerPort = port++; + int port = 10001; configs.add(new LocalTestTopologyConfig(args, port++, "remote1")); configs.add(new LocalTestTopologyConfig(args, port++, "remote2")); configs.add(new LocalTestTopologyConfig(args, port++, "remote3")); @@ -22,8 +24,11 @@ new StartTopologyManager(topologyManagerConfig).execute(); for (LocalTestTopologyConfig conf: configs ) { - new AliceDaemon(conf).listen(); - DataSegment.connect(conf.key, "rev" + conf.key, conf.hostname, toplogyManagerPort); + String[] csarg = {"--port ", Integer.toString(topologyManagerConfig.localPort), "--host","localhost" }; + TopologyNodeConfig cs = new TopologyNodeConfig(csarg); + cs.setLocalKey(conf.key); + cs.setManagerKey("manager"); + new StartTopologyNode(cs, new LTRemoteIncrement(conf)); } new LTopologyStartCodeSegment(configs).execute(); }