geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [2/4] geode git commit: Move the startBridgeClient method added to LocatorTestBase to AutoConnectionSourceDUnitTest, and use the DistributedRestoreSystemProperties rule.
Date Mon, 15 May 2017 18:02:22 GMT
Move the startBridgeClient method added to LocatorTestBase to
AutoConnectionSourceDUnitTest, and use the
DistributedRestoreSystemProperties rule.


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

Branch: refs/heads/develop
Commit: b62b9bc1bdd6a049f6e2def7dd067b0fb2c6c826
Parents: a7441ae
Author: masaki.yamakawa <masaki.yamakawa@ulsystems.co.jp>
Authored: Fri May 5 04:28:22 2017 +0900
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Mon May 15 11:05:56 2017 -0700

----------------------------------------------------------------------
 .../client/internal/AutoConnectionSourceDUnitTest.java  | 12 ++++++++++++
 .../geode/cache/client/internal/LocatorTestBase.java    |  7 -------
 2 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/b62b9bc1/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java
index af929a6..66679ba 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java
@@ -32,6 +32,7 @@ import org.apache.geode.internal.*;
 import org.apache.geode.internal.cache.*;
 import org.apache.geode.management.membership.*;
 import org.apache.geode.test.dunit.*;
+import org.apache.geode.test.dunit.rules.DistributedRestoreSystemProperties;
 import org.apache.geode.test.junit.categories.*;
 
 /**
@@ -44,6 +45,10 @@ public class AutoConnectionSourceDUnitTest extends LocatorTestBase {
   protected static final Object BRIDGE_LISTENER = "BRIDGE_LISTENER";
   private static final long MAX_WAIT = 60000;
 
+  @Rule
+  public DistributedRestoreSystemProperties restoreSystemProperties =
+      new DistributedRestoreSystemProperties();
+
   @Override
   public final void postSetUp() throws Exception {
     IgnoredException.addIgnoredException("NoAvailableLocatorsException");
@@ -569,6 +574,13 @@ public class AutoConnectionSourceDUnitTest extends LocatorTestBase {
     });
   }
 
+  protected void startBridgeClient(final String group, final String host, final int port,
+      Properties systemProperties) throws Exception {
+    systemProperties.entrySet().forEach(
+        entry -> System.setProperty(entry.getKey().toString(), entry.getValue().toString()));
+    startBridgeClient(group, host, port, new String[] {REGION_NAME});
+  }
+
   protected void checkUpdateLocatorListInterval(VM vm, final long expected) {
     vm.invoke(() -> {
       PoolImpl pool = (PoolImpl) PoolManager.find(POOL_NAME);

http://git-wip-us.apache.org/repos/asf/geode/blob/b62b9bc1/geode-core/src/test/java/org/apache/geode/cache/client/internal/LocatorTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/cache/client/internal/LocatorTestBase.java
b/geode-core/src/test/java/org/apache/geode/cache/client/internal/LocatorTestBase.java
index c0ca29e..c3b349a 100644
--- a/geode-core/src/test/java/org/apache/geode/cache/client/internal/LocatorTestBase.java
+++ b/geode-core/src/test/java/org/apache/geode/cache/client/internal/LocatorTestBase.java
@@ -289,13 +289,6 @@ public abstract class LocatorTestBase extends JUnit4DistributedTestCase
{
     }
   }
 
-  protected void startBridgeClient(final String group, final String host, final int port,
-      Properties systemProperties) throws Exception {
-    systemProperties.entrySet().forEach(
-        entry -> System.setProperty(entry.getKey().toString(), entry.getValue().toString()));
-    startBridgeClient(group, host, port, new String[] {REGION_NAME});
-  }
-
   protected void startBridgeClient(final String group, final String host, final int port)
       throws Exception {
     startBridgeClient(group, host, port, new String[] {REGION_NAME});


Mime
View raw message