You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gossip.apache.org by ec...@apache.org on 2017/06/28 12:57:06 UTC
incubator-gossip git commit: GOSSIP-91 Fixed random test failure in
SharedDataEventTest
Repository: incubator-gossip
Updated Branches:
refs/heads/master 176944951 -> f71460ab3
GOSSIP-91 Fixed random test failure in SharedDataEventTest
Project: http://git-wip-us.apache.org/repos/asf/incubator-gossip/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gossip/commit/f71460ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gossip/tree/f71460ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gossip/diff/f71460ab
Branch: refs/heads/master
Commit: f71460ab3d5e8de7350e28488fb930a3a4af1236
Parents: 1769449
Author: Mirage Abeysekara <mi...@cse.mrt.ac.lk>
Authored: Tue Jun 27 18:49:56 2017 +0530
Committer: Mirage Abeysekara <mi...@cse.mrt.ac.lk>
Committed: Tue Jun 27 18:49:56 2017 +0530
----------------------------------------------------------------------
.../test/java/org/apache/gossip/SharedDataEventTest.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-gossip/blob/f71460ab/gossip-itest/src/test/java/org/apache/gossip/SharedDataEventTest.java
----------------------------------------------------------------------
diff --git a/gossip-itest/src/test/java/org/apache/gossip/SharedDataEventTest.java b/gossip-itest/src/test/java/org/apache/gossip/SharedDataEventTest.java
index 56f1657..8dbfcb3 100644
--- a/gossip-itest/src/test/java/org/apache/gossip/SharedDataEventTest.java
+++ b/gossip-itest/src/test/java/org/apache/gossip/SharedDataEventTest.java
@@ -171,6 +171,17 @@ public class SharedDataEventTest extends AbstractIntegrationBase {
Assert.assertTrue(receivingNodeDataNewValue instanceof GrowOnlyCounter);
Assert.assertEquals(1, ((GrowOnlyCounter) receivingNodeDataNewValue).value().longValue());
+ // check whether Node 3 received the gCounter
+ TUnit.assertThat(() -> {
+ GrowOnlyCounter gc = (GrowOnlyCounter) clients.get(2).findCrdt(gCounterKey);
+ if (gc == null) {
+ return "";
+ } else {
+ return gc;
+ }
+ }).afterWaitingAtMost(10, TimeUnit.SECONDS).isEqualTo(
+ new GrowOnlyCounter(new GrowOnlyCounter.Builder(clients.get(0)).increment(1L)));
+
// Node 3 Updates the gCounter by 4
GrowOnlyCounter gc = (GrowOnlyCounter) clients.get(2).findCrdt(gCounterKey);
GrowOnlyCounter gcNew = new GrowOnlyCounter(gc,