From 0d8e522e9313bfd74a09e1e34a3767e0732dafed Mon Sep 17 00:00:00 2001 From: Vladimir Eliezer Tokarev Date: Fri, 22 Jan 2016 07:35:30 -0800 Subject: [PATCH] Changed the SimpleRegistry to work with UnsignedBulletinBoardMessage The basicMessage is not needed --- .../BulletinBoardClientIntegrationTest.java | 19 ++--- bulletin-board-server/meerkat | Bin 0 -> 9216 bytes .../src/main/java/meerkat/SimpleRegistry.java | 73 ++++++------------ 3 files changed, 34 insertions(+), 58 deletions(-) create mode 100644 bulletin-board-server/meerkat diff --git a/bulletin-board-client/src/test/java/BulletinBoardClientIntegrationTest.java b/bulletin-board-client/src/test/java/BulletinBoardClientIntegrationTest.java index dda76c7..9ce1ee4 100644 --- a/bulletin-board-client/src/test/java/BulletinBoardClientIntegrationTest.java +++ b/bulletin-board-client/src/test/java/BulletinBoardClientIntegrationTest.java @@ -4,20 +4,18 @@ import meerkat.bulletinboard.BulletinBoardClient.ClientCallback; import meerkat.bulletinboard.ThreadedBulletinBoardClient; import meerkat.protobuf.BulletinBoardAPI.*; import meerkat.protobuf.Crypto; - -import meerkat.protobuf.Voting.*; +import meerkat.protobuf.Voting.BulletinBoardClientParams; import meerkat.util.BulletinBoardMessageComparator; - import org.junit.Before; import org.junit.Test; -import static org.junit.Assert.*; -import static org.hamcrest.CoreMatchers.*; -import static org.hamcrest.number.OrderingComparison.*; - import java.util.*; import java.util.concurrent.Semaphore; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.number.OrderingComparison.greaterThanOrEqualTo; +import static org.junit.Assert.assertThat; + /** * Created by Arbel Deutsch Peled on 05-Dec-15. */ @@ -104,7 +102,7 @@ public class BulletinBoardClientIntegrationTest { private ReadCallback readCallback; private static String PROP_GETTY_URL = "gretty.httpBaseURI"; - private static String DEFAULT_BASE_URL = "http://localhost:8081"; + private static String DEFAULT_BASE_URL = "http://localhost:3306"; private static String BASE_URL = System.getProperty(PROP_GETTY_URL, DEFAULT_BASE_URL); @Before @@ -116,7 +114,7 @@ public class BulletinBoardClientIntegrationTest { testDB.add(BASE_URL); bulletinBoardClient.init(BulletinBoardClientParams.newBuilder() - .addBulletinBoardAddress("http://localhost:8081") + .addBulletinBoardAddress("http://localhost:3306") .setMinRedundancy((float) 1.0) .build()); @@ -165,6 +163,8 @@ public class BulletinBoardClientIntegrationTest { messageID = bulletinBoardClient.postMessage(msg,postCallback); + System.out.println(messageID.toByteArray()); + try { jobSemaphore.acquire(); } catch (InterruptedException e) { @@ -206,6 +206,7 @@ public class BulletinBoardClientIntegrationTest { System.err.println(t.getMessage()); } if (thrown.size() > 0) { + System.out.println(thrown.size()); assert false; } diff --git a/bulletin-board-server/meerkat b/bulletin-board-server/meerkat new file mode 100644 index 0000000000000000000000000000000000000000..c3aa05c7541db4449c3bbf29bfa4b81171cd8803 GIT binary patch literal 9216 zcmeH|K~LK-6vyo*P0A!rJLFVhsfX1lQ$Z8=wZ))lC51Fd>o`=|8oEkQL`V^6r*hrb z*m)mf2vzYZ-2d6*M6f0`hm0)?V)zBZQ`G`@8}O7c;+{57*>no<$N&> zZ$|UkB8(i>4dP`K`oZV3aINpLuFr_$?y`?0=SGIEG&9$BIy}= z%wuk!jmW{(OeXdio6^;%x@omq`0ksOD?JjYT-PWF%}r$cq#FES=1eoiWhB|8uu4WO zWWh(0ERrdk9J|iZG0U{rM9l0`x?>oY)51uW`RekFpUX+Gj4z};$>lNG&Kc&ZW?IcA zUTsJuYCF~H1sH0Sw8fr}sgpy`Ip}(0Q4A@ETnEvYuR+w_*`ldn+R+WG-+W4*iagm? zz4`(t!a7;4_z{!Rd0Q(8Q==IcRhFVQ?#E?|6P3!c#W9fsv{U<^K(#{(k1Npl_0!kI z9n9bAXWmJ00|G$c