geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esh...@apache.org
Subject incubator-geode git commit: [fixes GEODE-493] Fixes a race that an async thread not yet updating the PR metadata.
Date Wed, 28 Oct 2015 23:22:15 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-409 c9a7f1027 -> 0cc9d895b


[fixes GEODE-493] Fixes a race that an async thread not yet updating the PR metadata.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0cc9d895
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0cc9d895
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0cc9d895

Branch: refs/heads/feature/GEODE-409
Commit: 0cc9d895b9f4465138d0fa223b0a0cadc1107893
Parents: c9a7f10
Author: eshu <eshu@pivotal.io>
Authored: Wed Oct 28 16:19:59 2015 -0700
Committer: eshu <eshu@pivotal.io>
Committed: Wed Oct 28 16:19:59 2015 -0700

----------------------------------------------------------------------
 .../cache/PartitionedRegionSingleHopDUnitTest.java  | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0cc9d895/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
index 048706a..b538d81 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
@@ -2241,12 +2241,24 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase
{
 
   private void verifyMetadata() {
     ClientMetadataService cms = ((GemFireCacheImpl)cache).getClientMetadataService();
-    Map<String, ClientPartitionAdvisor> regionMetaData = cms
+    final Map<String, ClientPartitionAdvisor> regionMetaData = cms
         .getClientPRMetadata_TEST_ONLY();
+    
+    WaitCriterion wc = new WaitCriterion() {
+      public boolean done() {
+        return (regionMetaData.size() == 4);
+      }
+
+      public String description() {
+        return "expected PRAdvisor to be ready";
+      }
+    };
+    DistributedTestCase.waitForCriterion(wc, 60000, 1000, true);
+    
     assertEquals(4, regionMetaData.size());
     assertTrue(regionMetaData.containsKey(region.getFullPath()));
     final ClientPartitionAdvisor prMetaData = regionMetaData.get(region.getFullPath());
-    WaitCriterion wc = new WaitCriterion() {
+    wc = new WaitCriterion() {
       public boolean done() {
         return (prMetaData.getBucketServerLocationsMap_TEST_ONLY().size() == 4);
       }


Mime
View raw message