You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2018/08/24 22:47:24 UTC

[geode] 03/03: GEODE-5614: update RegionManagementDUnitTest usage of DistributedRule

This is an automated email from the ASF dual-hosted git repository.

klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit f91c2dfa319073ddb1222c3f50c26735d19332fe
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Fri Aug 24 10:53:15 2018 -0700

    GEODE-5614: update RegionManagementDUnitTest usage of DistributedRule
---
 .../apache/geode/management/RegionManagementDUnitTest.java    | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/management/RegionManagementDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/management/RegionManagementDUnitTest.java
index c12052a..2a75128 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/management/RegionManagementDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/management/RegionManagementDUnitTest.java
@@ -85,7 +85,7 @@ import org.apache.geode.management.internal.MBeanJMXAdapter;
 import org.apache.geode.management.internal.SystemManagementService;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.rules.CacheRule;
-import org.apache.geode.test.dunit.rules.DistributedTestRule;
+import org.apache.geode.test.dunit.rules.DistributedRule;
 import org.apache.geode.test.junit.rules.serializable.SerializableTestName;
 
 /**
@@ -99,7 +99,7 @@ import org.apache.geode.test.junit.rules.serializable.SerializableTestName;
  * Goal of the Test : RegionMBean gets created once region is created. Data like Region Attributes
  * data and stats are of proper value
  */
-@SuppressWarnings("serial,unused")
+@SuppressWarnings("serial")
 public class RegionManagementDUnitTest implements Serializable {
 
   private static final AtomicReference<List<Notification>> MEMBER_NOTIFICATIONS =
@@ -116,7 +116,7 @@ public class RegionManagementDUnitTest implements Serializable {
   private VM[] memberVMs;
 
   @Rule
-  public DistributedTestRule distributedTestRule = new DistributedTestRule();
+  public DistributedRule distributedRule = new DistributedRule();
 
   @Rule
   public CacheRule cacheRule = new CacheRule();
@@ -692,6 +692,11 @@ public class RegionManagementDUnitTest implements Serializable {
     // Destroyed/Closed With Name /MANAGEMENT_TEST_REGION]]>
   }
 
+  /**
+   * Please don't delete verifySystemNotifications. We need to improve verification in this test
+   * class and fix whatever flakiness is in this method.
+   */
+  @SuppressWarnings("unused")
   private void verifySystemNotifications(final String regionName, final int expectedMembers) {
     assertThat(SYSTEM_NOTIFICATIONS.get()).isNotNull();
     assertThat(SYSTEM_NOTIFICATIONS.get()).hasSize(expectedMembers + 2); // 2 for the manager