mivanac commented on a change in pull request #7144:
URL: https://github.com/apache/geode/pull/7144#discussion_r765537219



##########
File path: 
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
##########
@@ -1185,6 +1188,85 @@ public void 
testParallelGWSenderUpdateFiltersWhilePuttingOnOneDispatcThread() th
 
   }
 
+  /**
+   * Put entries in region after gateway sander is stopped. Count number of 
PQRM messages sent.
+   */
+  @Test
+  public void 
testDroppedEventsSignalizationToSecundaryQueueWhileSenderStopped() throws 
Exception {

Review comment:
       updated

##########
File path: 
geode-core/src/test/java/org/apache/geode/internal/cache/BucketAdvisorTest.java
##########
@@ -228,4 +228,53 @@ public void isShadowBucketDestroyedShouldReturnCorrectly() 
{
     // Unknown Shadow Bucket
     assertThat(bucketAdvisor.isShadowBucketDestroyed(SEPARATOR + 
"b5")).isFalse();
   }
+
+  @Test
+  public void testGetAllHostingMembersReturnsNoMember() throws Exception {
+    DistributionManager distributionManager = mock(DistributionManager.class);
+    when(distributionManager.getId()).thenReturn(new 
InternalDistributedMember("localhost", 321));
+
+    Bucket bucket = mock(Bucket.class);
+    when(bucket.isHosting()).thenReturn(true);
+    when(bucket.isPrimary()).thenReturn(false);
+    when(bucket.getDistributionManager()).thenReturn(distributionManager);
+
+    PartitionedRegion partitionedRegion = mock(PartitionedRegion.class);
+    when(partitionedRegion.getRedundantCopies()).thenReturn(0);
+    when(partitionedRegion.getPartitionAttributes()).thenReturn(new 
PartitionAttributesImpl());
+    RegionAdvisor regionAdvisor = mock(RegionAdvisor.class);
+    when(regionAdvisor.getPartitionedRegion()).thenReturn(partitionedRegion);
+
+    BucketAdvisor bucketAdvisor = BucketAdvisor.createBucketAdvisor(bucket, 
regionAdvisor);
+    assertThat(bucketAdvisor.getAllHostingMembers().isEmpty()).isTrue();
+  }
+
+  @Test
+  public void testGetAllHostingMembersReturnsOneMember() throws Exception {

Review comment:
       updated

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
##########
@@ -1981,6 +1982,36 @@ public void run() {
       return recipients;
     }
 
+
+    private Set<InternalDistributedMember> 
getAllRecipientsForEvent(InternalCache cache,
+        String partitionedRegionName, int bucketId) {
+      Set recipients = new ObjectOpenHashSet();

Review comment:
       updated




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to