geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [06/26] incubator-geode git commit: GEODE-1571: add utility method to simplify client cache creation
Date Thu, 30 Jun 2016 19:23:11 GMT
GEODE-1571: add utility method to simplify client cache creation


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

Branch: refs/heads/feature/GEODE-1571
Commit: 6c16f6f2bcbc3512ba995d3f1842a2fde63c115c
Parents: cfbcba1
Author: Jinmei Liao <jiliao@pivotal.io>
Authored: Mon Jun 27 15:11:47 2016 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Mon Jun 27 15:11:47 2016 -0700

----------------------------------------------------------------------
 ...ientPartitionAttrCmdAuthDistributedTest.java | 23 ++++----------------
 1 file changed, 4 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6c16f6f2/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetClientPartitionAttrCmdAuthDistributedTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetClientPartitionAttrCmdAuthDistributedTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetClientPartitionAttrCmdAuthDistributedTest.java
index fbbdc05..b69e521 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetClientPartitionAttrCmdAuthDistributedTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/IntegratedClientGetClientPartitionAttrCmdAuthDistributedTest.java
@@ -16,42 +16,27 @@
  */
 package com.gemstone.gemfire.security;
 
-import java.util.Arrays;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
 import com.gemstone.gemfire.cache.client.internal.GetClientPartitionAttributesOp;
 import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
 @Category(DistributedTest.class)
 public class IntegratedClientGetClientPartitionAttrCmdAuthDistributedTest extends AbstractIntegratedClientAuthDistributedTest
{
 
   @Test
   public void testGetClientPartitionAttrCmd() {
     client1.invoke("logging in super-user with correct password", () -> {
-      ClientCache cache = new ClientCacheFactory(createClientProperties("stranger", "1234567"))
-        .setPoolSubscriptionEnabled(true)
-        .addPoolServer("localhost", serverPort)
-        .create();
-
-      Region region = cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION_NAME);
+      ClientCache cache =createClientCache("stranger", "1234567", serverPort);
 
       assertNotAuthorized(() -> GetClientPartitionAttributesOp.execute((PoolImpl)cache.getDefaultPool(),
REGION_NAME), "CLUSTER:READ");
     });
 
     client2.invoke("logging in super-user with correct password", () -> {
-      ClientCache cache = new ClientCacheFactory(createClientProperties("super-user", "1234567"))
-        .setPoolSubscriptionEnabled(true)
-        .addPoolServer("localhost", serverPort)
-        .create();
-
-      Region region = cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION_NAME);
+      ClientCache cache = createClientCache("super-user", "1234567", serverPort);
 
       GetClientPartitionAttributesOp.execute((PoolImpl)cache.getDefaultPool(), REGION_NAME);
     });


Mime
View raw message