Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 340:111e57d0b233
add logupdate test
(first try)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 28 Aug 2017 21:54:42 +0900 |
parents | 7a7d5d175c0c |
children | 7388d8606528 |
files | src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTest.java src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTestConfig.java src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTestStartCodeSegment.java |
diffstat | 3 files changed, 56 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTest.java Mon Aug 28 21:54:42 2017 +0900 @@ -0,0 +1,17 @@ +package jp.ac.u_ryukyu.ie.cr.junglenetwork.logupdate; + +import alice.daemon.AliceDaemon; +import alice.datasegment.DataSegment; + +/** + * Created by kono on 2017/08/28. + */ +public class LogupdateTest { + public static void main(String[] args) { + LogupdateTestConfig conf = new LogupdateTestConfig(args);//トポロジー設定をコマンドライン引数からとって設定? + + new AliceDaemon(conf).listen();//構成開始?TopMはない + DataSegment.connect(conf.key, "", conf.hostname, conf.connectPort); + new LogupdateTestStartCodeSegment().execute(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTestConfig.java Mon Aug 28 21:54:42 2017 +0900 @@ -0,0 +1,26 @@ +package jp.ac.u_ryukyu.ie.cr.junglenetwork.logupdate; + +import alice.daemon.Config; + +/** + * Created by kono on 2017/08/28. + */ +public class LogupdateTestConfig extends Config { + + public String hostname = "127.0.0.1"; + public int connectPort = 10000; + public String key = "remote"; + + public LogupdateTestConfig(String[] args) { + super(args); + for (int i = 0; i< args.length; i++) { + if ("-h".equals(args[i])) { + hostname = args[++i]; + } else if ("-cp".equals(args[i])) { + connectPort = Integer.parseInt(args[++i]); + } else if ("-key".equals(args[i])) { + key = args[++i]; + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTestStartCodeSegment.java Mon Aug 28 21:54:42 2017 +0900 @@ -0,0 +1,13 @@ +package jp.ac.u_ryukyu.ie.cr.junglenetwork.logupdate; + +import alice.codesegment.CodeSegment; + +/** + * Created by kono on 2017/08/28. + */ +public class LogupdateTestStartCodeSegment extends CodeSegment { + @Override + public void run() { + + } +}