Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 346:f7a5189d94d7
work LogupdateTest but endless loop
author | nozomi |
---|---|
date | Thu, 14 Sep 2017 19:27:15 +0900 |
parents | ec382195c477 |
children | ae75a2d618f4 |
files | jungle-core.iml 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 | 4 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/jungle-core.iml Wed Sep 13 17:37:56 2017 +0900 +++ b/jungle-core.iml Thu Sep 14 19:27:15 2017 +0900 @@ -61,7 +61,7 @@ <orderEntry type="module-library"> <library name="Gradle: cr.ie.u_ryukyu.ac.jp:Alice:1.1"> <CLASSES> - <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/cr.ie.u_ryukyu.ac.jp/Alice/1.1/c5bad19fa3fb3f79f1775aa22158a200ed7f4d7c/Alice-1.1.jar!/" /> + <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/cr.ie.u_ryukyu.ac.jp/Alice/1.1/7c97e4cbaf96d287ca1c4a8db639b8453a6debcd/Alice-1.1.jar!/" /> </CLASSES> <JAVADOC /> <SOURCES />
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTest.java Wed Sep 13 17:37:56 2017 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTest.java Thu Sep 14 19:27:15 2017 +0900 @@ -11,6 +11,7 @@ public static void main(String[] args) { LogupdateTestConfig conf = new LogupdateTestConfig(args); LogupdateTestStartCodeSegment cs = new LogupdateTestStartCodeSegment(); + cs.ods.put("config", conf); if (conf.getManagerHostName() !=null){ new TopologyNode(conf, cs); } else {
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTestConfig.java Wed Sep 13 17:37:56 2017 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTestConfig.java Thu Sep 14 19:27:15 2017 +0900 @@ -13,9 +13,11 @@ public int connectPort = 10000; public String key = "remote"; private boolean writeMode = false; + private String[] args1; public LogupdateTestConfig(String[] args) { super(args); + args1 = args; for (int i = 0; i< args.length; i++) { if ("-h".equals(args[i])) { hostname = args[++i]; @@ -32,4 +34,8 @@ public boolean isWriteMode() { return writeMode; } + + public String[] getArgs() { + return args1; + } }
--- a/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTestStartCodeSegment.java Wed Sep 13 17:37:56 2017 +0900 +++ b/src/test/java/jp/ac/u_ryukyu/ie/cr/junglenetwork/logupdate/LogupdateTestStartCodeSegment.java Thu Sep 14 19:27:15 2017 +0900 @@ -8,6 +8,7 @@ import jp.ac.u_ryukyu.ie.cr.jungle.bbs.BBSTest; import jp.ac.u_ryukyu.ie.cr.jungleNetwork.codesegment.LogUpdateCodeSegment; import jp.ac.u_ryukyu.ie.cr.jungleNetwork.core.NetworkDefaultJungle; +import jp.ac.u_ryukyu.ie.cr.jungleNetwork.persistent.AliceJournal; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -33,6 +34,7 @@ public void run() { String name = host.asString(); LogupdateTestConfig config = conf.asClass(LogupdateTestConfig.class); + args = config.getArgs(); Matcher matcher = pattern.matcher(name); matcher.find(); @@ -41,7 +43,7 @@ if (arg.equals("-persistent")) { persistentFlag = true; } - BBSTest bbsTest = new BBSTest(new NetworkDefaultJungle(null, "hoge")); + BBSTest bbsTest = new BBSTest(new NetworkDefaultJungle(new AliceJournal(), "hoge")); Logupdator cassaBBS = new Logupdator(name, bbsTest); cassaBBS.init(); ods.put("updator", cassaBBS);