You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by es...@apache.org on 2018/08/03 19:29:59 UTC
[geode] branch feature/GEODE-5524 updated: GEODE-5524: Fix a race
by waiting on correct condition.
This is an automated email from the ASF dual-hosted git repository.
eshu11 pushed a commit to branch feature/GEODE-5524
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-5524 by this push:
new 487f515 GEODE-5524: Fix a race by waiting on correct condition.
487f515 is described below
commit 487f515b69b3ececac71a356c5a19b15478ce18f
Author: eshu <es...@pivotal.io>
AuthorDate: Fri Aug 3 12:28:27 2018 -0700
GEODE-5524: Fix a race by waiting on correct condition.
---
...rTransactionFailoverWithMixedVersionServersDistributedTest.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java
index 6a96176..b815950 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java
@@ -115,6 +115,7 @@ public class ClientServerTransactionFailoverWithMixedVersionServersDistributedTe
setupPartiallyRolledVersion();
server1.invoke(() -> createServerRegion(1, false));
+ server1.invoke(() -> cacheRule.getCache().getRegion(regionName).put(1, "originalValue"));
server2.invoke(() -> createServerRegion(1, true));
server3.invoke(() -> createServerRegion(1, true));
server4.invoke(() -> createServerRegion(1, true));
@@ -126,6 +127,8 @@ public class ClientServerTransactionFailoverWithMixedVersionServersDistributedTe
int numOfOperations = 12;
client.invokeAsync(() -> doTransactions(numOfTransactions, numOfOperations));
+ server1.invoke(() -> verifyTransactionAreStarted(numOfTransactions));
+
unregisterClientMultipleTimes(clientProxyMembershipID);
server1.invoke(() -> verifyTransactionResult(numOfTransactions, numOfOperations, false));
@@ -351,9 +354,9 @@ public class ClientServerTransactionFailoverWithMixedVersionServersDistributedTe
} else {
region = cacheRule.getCache().getRegion(regionName);
}
- Awaitility.await().atMost(60, TimeUnit.SECONDS)
- .until(() -> assertThat(region.get(1)).isEqualTo("value1"));
int numOfEntries = numOfOperations * numOfTransactions;
+ Awaitility.await().atMost(60, TimeUnit.SECONDS)
+ .until(() -> assertThat(region.size()).isEqualTo(numOfEntries));
for (int i = 1; i <= numOfEntries; i++) {
LogService.getLogger().info("region get key {} value {} ", i, region.get(i));
}