geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zho...@apache.org
Subject [7/8] geode git commit: GEODE-3317: Fix UniversalMembershipListenerAdapterDUnitTest
Date Mon, 31 Jul 2017 22:17:20 GMT
GEODE-3317: Fix UniversalMembershipListenerAdapterDUnitTest


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

Branch: refs/heads/feature/GEM-1483
Commit: ab0543bee3901b113a50b8b12ef9c08f90a9cefa
Parents: 9db5c8e
Author: Jared Stewart <jstewart@pivotal.io>
Authored: Fri Jul 28 10:37:52 2017 -0700
Committer: Jared Stewart <jstewart@pivotal.io>
Committed: Mon Jul 31 13:15:39 2017 -0700

----------------------------------------------------------------------
 .../UniversalMembershipListenerAdapterDUnitTest.java          | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/ab0543be/geode-core/src/test/java/org/apache/geode/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/UniversalMembershipListenerAdapterDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/management/UniversalMembershipListenerAdapterDUnitTest.java
index d6f2579..0773262 100644
--- a/geode-core/src/test/java/org/apache/geode/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -15,6 +15,7 @@
 package org.apache.geode.management;
 
 import static org.apache.geode.distributed.ConfigurationProperties.*;
+import static org.apache.geode.distributed.internal.DistributionConfig.RESTRICT_MEMBERSHIP_PORT_RANGE;
 import static org.apache.geode.test.dunit.Assert.*;
 import static org.apache.geode.test.dunit.LogWriterUtils.*;
 
@@ -32,6 +33,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.geode.distributed.internal.ServerLocation;
 import org.junit.Before;
+import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -64,6 +66,7 @@ import org.apache.geode.test.dunit.SerializableCallable;
 import org.apache.geode.test.dunit.SerializableRunnable;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.Wait;
+import org.apache.geode.test.dunit.rules.DistributedRestoreSystemProperties;
 import org.apache.geode.test.junit.categories.DistributedTest;
 import org.apache.geode.test.junit.categories.FlakyTest;
 
@@ -74,6 +77,9 @@ import org.apache.geode.test.junit.categories.FlakyTest;
  */
 @Category(DistributedTest.class)
 public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTestCase {
+  @ClassRule
+  public static DistributedRestoreSystemProperties distributedRestoreSystemProperties =
+      new DistributedRestoreSystemProperties();
 
   protected static final boolean CLIENT = true;
   protected static final boolean SERVER = false;
@@ -916,6 +922,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
     SerializableCallable createBridgeClient = new SerializableCallable("Create bridge client")
{
       @Override
       public Object call() {
+        System.setProperty(RESTRICT_MEMBERSHIP_PORT_RANGE, "false");
         System.out.println("[doTestSystemClientEventsInServer] create system bridge client");
         assertTrue(getSystem(serverProperties).isConnected());
         assertFalse(getCache().isClosed());


Mime
View raw message