geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject geode git commit: Revert "GEODE-1887: Now Size api goes through ServerProxy when cache is of type client and DataPolicy is Empty."
Date Wed, 01 Mar 2017 01:59:34 GMT
Repository: geode
Updated Branches:
  refs/heads/develop 8b762bede -> 8a2983f6e


Revert "GEODE-1887: Now Size api goes through ServerProxy when cache is of type client and
DataPolicy is Empty."

This reverts commit f2721dc81256bcec84e855e9dc52d2f234e745da.

The commit breaks ClientServerMiscBCDUnitTest.


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

Branch: refs/heads/develop
Commit: 8a2983f6e0d95f5adc4b864544c057ee31d877c0
Parents: 8b762be
Author: Kirk Lund <klund@apache.org>
Authored: Tue Feb 28 17:44:18 2017 -0800
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Feb 28 17:59:25 2017 -0800

----------------------------------------------------------------------
 .../geode/internal/cache/LocalRegion.java       |  6 --
 .../tier/sockets/ClientServerMiscDUnitTest.java | 84 +++++---------------
 2 files changed, 21 insertions(+), 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/8a2983f6/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index 382c225..5d5c7e2 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -9122,12 +9122,6 @@ public class LocalRegion extends AbstractRegion implements LoaderHelperFactory,
       lockRIReadLock(); // bug #40871 - test sees wrong size for region during RI
     }
     try {
-      if (isClient && getDataPolicy() == DataPolicy.EMPTY) {
-        ServerRegionProxy srp = getServerProxy();
-        if (srp != null) {
-          return srp.size();
-        }
-      }
       return entryCount();
     } finally {
       if (isClient) {

http://git-wip-us.apache.org/repos/asf/geode/blob/8a2983f6/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
index 06ea6ba..b4f3185 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
@@ -23,12 +23,20 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
 import org.apache.geode.GemFireConfigException;
 import org.apache.geode.GemFireIOException;
-import org.apache.geode.cache.*;
-import org.apache.geode.cache.client.*;
+import org.apache.geode.cache.AttributesFactory;
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.CacheException;
+import org.apache.geode.cache.CacheWriterException;
+import org.apache.geode.cache.DataPolicy;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionAttributes;
+import org.apache.geode.cache.Scope;
+import org.apache.geode.cache.client.ClientCacheFactory;
+import org.apache.geode.cache.client.NoAvailableServersException;
+import org.apache.geode.cache.client.Pool;
+import org.apache.geode.cache.client.PoolManager;
 import org.apache.geode.cache.client.internal.Connection;
 import org.apache.geode.cache.client.internal.Op;
 import org.apache.geode.cache.client.internal.PoolImpl;
@@ -41,7 +49,15 @@ import org.apache.geode.internal.AvailablePort;
 import org.apache.geode.internal.cache.CacheServerImpl;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.LocalRegion;
-import org.apache.geode.test.dunit.*;
+import org.apache.geode.test.dunit.Assert;
+import org.apache.geode.test.dunit.DistributedTestUtils;
+import org.apache.geode.test.dunit.Host;
+import org.apache.geode.test.dunit.IgnoredException;
+import org.apache.geode.test.dunit.LogWriterUtils;
+import org.apache.geode.test.dunit.NetworkUtils;
+import org.apache.geode.test.dunit.VM;
+import org.apache.geode.test.dunit.Wait;
+import org.apache.geode.test.dunit.WaitCriterion;
 import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
 import org.apache.geode.test.dunit.standalone.VersionManager;
 import org.apache.geode.test.junit.categories.ClientServerTest;
@@ -61,7 +77,6 @@ import java.util.Set;
  * Tests client server corner cases between Region and Pool
  */
 @Category({DistributedTest.class, ClientServerTest.class})
-@RunWith(JUnitParamsRunner.class)
 public class ClientServerMiscDUnitTest extends JUnit4CacheTestCase {
 
   protected static PoolImpl pool = null;
@@ -758,63 +773,6 @@ public class ClientServerMiscDUnitTest extends JUnit4CacheTestCase {
   }
 
 
-  @Test
-  @Parameters(method = "regionShortcut")
-  public void testProxyRegionClientServerOp(RegionShortcut shortcut) throws Exception {
-    // start server first
-    final String REGION_NAME = "proxyRegionClientServerOp";
-    PORT1 = initServerCache(false);
-    // Create regions on servers.
-    server1.invoke(() -> {
-      Cache cache = CacheFactory.getAnyInstance();
-      Region<Object, Object> region = cache.createRegionFactory(shortcut).create(REGION_NAME);
-      assertNotNull(region);
-    });
-
-    String host = NetworkUtils.getServerHostName(server1.getHost());
-
-    Properties props = new Properties();
-    props.setProperty(MCAST_PORT, "0");
-    props.setProperty(LOCATORS, "");
-    ClientCacheFactory ccf = new ClientCacheFactory(props);
-    ccf.addPoolServer(host, PORT1);
-
-    ClientCache clientCache = ccf.create();
-    Region<Object, Object> clientRegion =
-        clientCache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION_NAME);
-    assertNotNull(clientRegion);
-
-    // let us populate this region from client.
-    for (int i = 0; i < 10; i++) {
-      clientRegion.put(i, i * 10);
-    }
-    // Verify using gets
-    for (int i = 0; i < 10; i++) {
-      assertEquals(i * 10, clientRegion.get(i));
-    }
-    assertEquals(10, clientRegion.size());
-    assertFalse(clientRegion.isEmpty());
-    // delete all the entries from the server
-    server1.invoke(() -> {
-      Cache cache = CacheFactory.getAnyInstance();
-      Region<Object, Object> region = cache.getRegion(REGION_NAME);
-      assertNotNull(region);
-      for (int i = 0; i < 10; i++) {
-        region.remove(i);
-      }
-    });
-    assertEquals(0, clientRegion.size());
-    assertTrue(clientRegion.isEmpty());
-
-    clientRegion.destroyRegion();
-    clientCache.close();
-  }
-
-  private RegionShortcut[] regionShortcut() {
-    return new RegionShortcut[] {RegionShortcut.PARTITION, RegionShortcut.REPLICATE};
-  }
-
-
   private void createCache(Properties props) throws Exception {
     createCacheV(props);
   }


Mime
View raw message