You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/06/09 15:52:59 UTC

[GitHub] [geode] mivanac opened a new pull request #5227: GEODE-8191: flaky test correction

mivanac opened a new pull request #5227:
URL: https://github.com/apache/geode/pull/5227


   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [*] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [*] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [*] Is your initial contribution a single, squashed commit?
   
   - [*] Does `gradlew build` run cleanly?
   
   - [*] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac commented on pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
mivanac commented on pull request #5227:
URL: https://github.com/apache/geode/pull/5227#issuecomment-670492076


   Since there is no reply on this PR, I will close it.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jujoramos commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
jujoramos commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r440331734



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -82,16 +82,19 @@ public void testBucketCount() {
     server3.invoke(() -> createBuckets(regionName));
     server4.invoke(() -> createBuckets(regionName));
 
-    await().untilAsserted(() -> {
-      final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
-          server2.invoke(() -> getBucketsInitialized()) +
-          server3.invoke(() -> getBucketsInitialized()) +
-          server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 1000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 1000);
-    });
-
     for (int i = 1; i < 4; i++) {
+
+      final int index = i;
+      await().untilAsserted(() -> {
+        final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
+            server2.invoke(() -> getBucketsInitialized()) +
+            server3.invoke(() -> getBucketsInitialized()) +
+            server4.invoke(() -> getBucketsInitialized());
+        final int expectedBuckets = index * 1000;
+        assertThat(sumOfBuckets).isEqualTo(expectedBuckets);
+
+      });

Review comment:
       > Reason for this test was to prove previous fault, which was showing value arround 1000, when expected was 4000.
   
   Unless I'm missing something, I don't think this is accurate.
   The test itself (before the changes) creates a `PARTITION_PERSISTENT` with `1000` buckets, makes sure all buckets have been created (`PartitionRegionHelper.assignBucketsToPartitions`) on all members and asserts that the total bucket count is `1000`. After that, it creates 3 more `PARTITION_PERSISTENT` with `1000` buckets each, co-located with the original region (`testCreateRegion`), and asserts that the total bucket count at the very end is `4000` (`1000` per region).
   The flakiness, I believe, is caused by the fact that the test is not invoking `PartitionRegionHelper.assignBucketsToPartitions` on the 3 regions created within the loop, so when it asserts the results some buckets might have not been created yet.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jujoramos commented on pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
jujoramos commented on pull request #5227:
URL: https://github.com/apache/geode/pull/5227#issuecomment-670504376


   Hello @mivanac , 
   Just for the record, I've been actively reviewing this `PR` since it was opened but I don't think the fix is sufficient to fix the flakiness, that's why I requested changes on `15/06/2020`; there wasn't any response from your side afterwards.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
mivanac commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r440252322



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -82,16 +82,19 @@ public void testBucketCount() {
     server3.invoke(() -> createBuckets(regionName));
     server4.invoke(() -> createBuckets(regionName));
 
-    await().untilAsserted(() -> {
-      final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
-          server2.invoke(() -> getBucketsInitialized()) +
-          server3.invoke(() -> getBucketsInitialized()) +
-          server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 1000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 1000);
-    });
-
     for (int i = 1; i < 4; i++) {
+
+      final int index = i;
+      await().untilAsserted(() -> {
+        final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
+            server2.invoke(() -> getBucketsInitialized()) +
+            server3.invoke(() -> getBucketsInitialized()) +
+            server4.invoke(() -> getBucketsInitialized());
+        final int expectedBuckets = index * 1000;
+        assertThat(sumOfBuckets).isEqualTo(expectedBuckets);
+
+      });

Review comment:
       I mean that we dont execute consecutive creations of regions.
   All other stats are not relevant for this test. Reason for this test was to prove previous fault, which was showing value arround 1000, when expected was 4000.
   I would not preffer to add additional checks




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jujoramos commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
jujoramos commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r440361325



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -82,16 +82,19 @@ public void testBucketCount() {
     server3.invoke(() -> createBuckets(regionName));
     server4.invoke(() -> createBuckets(regionName));
 
-    await().untilAsserted(() -> {
-      final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
-          server2.invoke(() -> getBucketsInitialized()) +
-          server3.invoke(() -> getBucketsInitialized()) +
-          server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 1000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 1000);
-    });
-
     for (int i = 1; i < 4; i++) {
+
+      final int index = i;
+      await().untilAsserted(() -> {
+        final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
+            server2.invoke(() -> getBucketsInitialized()) +
+            server3.invoke(() -> getBucketsInitialized()) +
+            server4.invoke(() -> getBucketsInitialized());
+        final int expectedBuckets = index * 1000;
+        assertThat(sumOfBuckets).isEqualTo(expectedBuckets);
+
+      });

Review comment:
       The change to wait within the loop might help, I'm not arguing that, but I still don't think that it will fix the flakiness; it also clutters the test class a lot.
   I believe the proper fix would be to force the bucket creation (`PartitionRegionHelper.assignBucketsToPartitions`) within the loop after each region is created, as you're already doing for the initial region (`testCreateRegion`).




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] onichols-pivotal commented on pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
onichols-pivotal commented on pull request #5227:
URL: https://github.com/apache/geode/pull/5227#issuecomment-664011524


   this PR appears to be abandoned, can it be closed?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jujoramos commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
jujoramos commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r440193843



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -82,16 +82,19 @@ public void testBucketCount() {
     server3.invoke(() -> createBuckets(regionName));
     server4.invoke(() -> createBuckets(regionName));
 
-    await().untilAsserted(() -> {
-      final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
-          server2.invoke(() -> getBucketsInitialized()) +
-          server3.invoke(() -> getBucketsInitialized()) +
-          server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 1000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 1000);
-    });
-
     for (int i = 1; i < 4; i++) {
+
+      final int index = i;
+      await().untilAsserted(() -> {
+        final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
+            server2.invoke(() -> getBucketsInitialized()) +
+            server3.invoke(() -> getBucketsInitialized()) +
+            server4.invoke(() -> getBucketsInitialized());
+        final int expectedBuckets = index * 1000;
+        assertThat(sumOfBuckets).isEqualTo(expectedBuckets);
+
+      });

Review comment:
       Any reasoning behind moving the assertion block inside the loop?. The actual flakiness was reported for the last assertion, not this one.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac commented on pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
mivanac commented on pull request #5227:
URL: https://github.com/apache/geode/pull/5227#issuecomment-670507310


   Just for record, If you look at last commit, you can see that your requst (to force the bucket creation) is fullfilled.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
mivanac commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r440338325



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -82,16 +82,19 @@ public void testBucketCount() {
     server3.invoke(() -> createBuckets(regionName));
     server4.invoke(() -> createBuckets(regionName));
 
-    await().untilAsserted(() -> {
-      final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
-          server2.invoke(() -> getBucketsInitialized()) +
-          server3.invoke(() -> getBucketsInitialized()) +
-          server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 1000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 1000);
-    });
-
     for (int i = 1; i < 4; i++) {
+
+      final int index = i;
+      await().untilAsserted(() -> {
+        final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
+            server2.invoke(() -> getBucketsInitialized()) +
+            server3.invoke(() -> getBucketsInitialized()) +
+            server4.invoke(() -> getBucketsInitialized());
+        final int expectedBuckets = index * 1000;
+        assertThat(sumOfBuckets).isEqualTo(expectedBuckets);
+
+      });

Review comment:
       When I say  previous fault, I am referring to the issue, due to which this test was introduced. 
   Regarding flakiness, I believe that check with await, after creation of each region will secure that we will not create new region until all processes connected with previous created region are not finished.
   But if you not agree I will close this PR.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
mivanac commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r437394062



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -104,8 +105,10 @@ public void testBucketCount() {
           server2.invoke(() -> getBucketsInitialized()) +
           server3.invoke(() -> getBucketsInitialized()) +
           server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 4000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 4000);
+      assertTrue("Expected bucket count is greather than 3500, and actual count is " + sumOfBuckets,
+          sumOfBuckets > 3500);

Review comment:
       Problem is that this flaky error can not be reproduced localy (in 1000 repeated executions there are no errors), so I can debug it.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jujoramos commented on pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
jujoramos commented on pull request #5227:
URL: https://github.com/apache/geode/pull/5227#issuecomment-670514196


   Dang!, somehow I totally missed that notification and there wasn't any new comments on the `PR` (other than the one from Owen) so I didn't get any specific email addressed to myself (hard to keep track of old `PRs` when there are so many emails coming and going), sorry about that!.
   I can have a look at the `PR` if you re-open it 👍 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
mivanac commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r440204465



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -82,16 +82,19 @@ public void testBucketCount() {
     server3.invoke(() -> createBuckets(regionName));
     server4.invoke(() -> createBuckets(regionName));
 
-    await().untilAsserted(() -> {
-      final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
-          server2.invoke(() -> getBucketsInitialized()) +
-          server3.invoke(() -> getBucketsInitialized()) +
-          server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 1000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 1000);
-    });
-
     for (int i = 1; i < 4; i++) {
+
+      final int index = i;
+      await().untilAsserted(() -> {
+        final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
+            server2.invoke(() -> getBucketsInitialized()) +
+            server3.invoke(() -> getBucketsInitialized()) +
+            server4.invoke(() -> getBucketsInitialized());
+        final int expectedBuckets = index * 1000;
+        assertThat(sumOfBuckets).isEqualTo(expectedBuckets);
+
+      });

Review comment:
       During testing of reported fault, it was observed incosistency of results, if there were no pause between region creation. 
   And also if flakiness still exist, to get more info, at which step fault happens.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mivanac closed pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
mivanac closed pull request #5227:
URL: https://github.com/apache/geode/pull/5227


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jujoramos commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
jujoramos commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r440233185



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -82,16 +82,19 @@ public void testBucketCount() {
     server3.invoke(() -> createBuckets(regionName));
     server4.invoke(() -> createBuckets(regionName));
 
-    await().untilAsserted(() -> {
-      final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
-          server2.invoke(() -> getBucketsInitialized()) +
-          server3.invoke(() -> getBucketsInitialized()) +
-          server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 1000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 1000);
-    });
-
     for (int i = 1; i < 4; i++) {
+
+      final int index = i;
+      await().untilAsserted(() -> {
+        final int sumOfBuckets = server1.invoke(() -> getBucketsInitialized()) +
+            server2.invoke(() -> getBucketsInitialized()) +
+            server3.invoke(() -> getBucketsInitialized()) +
+            server4.invoke(() -> getBucketsInitialized());
+        final int expectedBuckets = index * 1000;
+        assertThat(sumOfBuckets).isEqualTo(expectedBuckets);
+
+      });

Review comment:
       According to what I see in the last 4 failures within the `CI` for this test, the actual assertion failure happens when we expect 4000 as the total buckets (later in the test), not here:
   
   - https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/DistributedTestOpenJDK11/builds/205
   - https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/DistributedTestOpenJDK11/builds/219
   - https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/DistributedTestOpenJDK11/builds/234
   - https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/DistributedTestOpenJDK11/builds/249
   
   > If there were no pause between region creation.
   
   What do you mean?, if we optimistically hope for the region creation to be completed within the loop we might hit more flakiness. Instead, we should add some logic to double check that all operations have finished on the servers before executing the assertions. The following might help:
   
   ```
     private void waitForSilence() {
       DMStats dmStats = cacheRule.getSystem().getDistributionManager().getStats();
       PartitionedRegion region = (PartitionedRegion) cacheRule.getCache().getRegion(REGION_NAME);
       PartitionedRegionStats partitionedRegionStats = region.getPrStats();
   
       await().untilAsserted(() -> {
         assertThat(dmStats.getReplyWaitsInProgress()).isEqualTo(0);
         assertThat(partitionedRegionStats.getVolunteeringInProgress()).isEqualTo(0);
         assertThat(partitionedRegionStats.getBucketCreatesInProgress()).isEqualTo(0);
         assertThat(partitionedRegionStats.getPrimaryTransfersInProgress()).isEqualTo(0);
         assertThat(partitionedRegionStats.getRebalanceBucketCreatesInProgress()).isEqualTo(0);
         assertThat(partitionedRegionStats.getRebalancePrimaryTransfersInProgress()).isEqualTo(0);
       });
     }
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mkevo commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
mkevo commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r437373243



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -104,8 +105,10 @@ public void testBucketCount() {
           server2.invoke(() -> getBucketsInitialized()) +
           server3.invoke(() -> getBucketsInitialized()) +
           server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 4000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 4000);
+      assertTrue("Expected bucket count is greather than 3500, and actual count is " + sumOfBuckets,
+          sumOfBuckets > 3500);
+      // assertEquals("Expected bucket count is 4000, and actual count is " + sumOfBuckets,

Review comment:
       Please remove these commented lines. Thanks!




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jujoramos commented on a change in pull request #5227: GEODE-8191: flaky test correction

Posted by GitBox <gi...@apache.org>.
jujoramos commented on a change in pull request #5227:
URL: https://github.com/apache/geode/pull/5227#discussion_r437386121



##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -104,8 +105,10 @@ public void testBucketCount() {
           server2.invoke(() -> getBucketsInitialized()) +
           server3.invoke(() -> getBucketsInitialized()) +
           server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 4000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 4000);
+      assertTrue("Expected bucket count is greather than 3500, and actual count is " + sumOfBuckets,
+          sumOfBuckets > 3500);

Review comment:
       I believe this change just "hides" the flakiness. If we are expecting a deterministic bucket count between all members, we should find a way to wait for the condition to become true and directly assert that as we were doing before.

##########
File path: geode-core/src/distributedTest/java/org/apache/geode/management/MemberMXBeanDistributedTest.java
##########
@@ -104,8 +105,10 @@ public void testBucketCount() {
           server2.invoke(() -> getBucketsInitialized()) +
           server3.invoke(() -> getBucketsInitialized()) +
           server4.invoke(() -> getBucketsInitialized());
-      assertEquals("Expected bucket count is 4000, and actual count is " + sumOfBuckets,
-          sumOfBuckets, 4000);
+      assertTrue("Expected bucket count is greather than 3500, and actual count is " + sumOfBuckets,
+          sumOfBuckets > 3500);

Review comment:
       Understood, but I still don't think this is the right fix: we're just "masking" the issue, not solving it. The test is creating two partition regions, each one is configured to have `1000` buckets and `1` redundant copy, so the test should assert that we end up having `4000` buckets, not some value higher than `3750`.
   If we don't fix the race condition within the test, in some time we might see the same failure just because the bucket count is lower than `3750`.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org