You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2015/09/03 01:58:21 UTC

[16/17] incubator-geode git commit: removed BridgeWriter refs

removed BridgeWriter refs


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

Branch: refs/heads/feature/GEODE-243
Commit: 1d7601e5cb235e3c52b306aa46226694fbbeb2a6
Parents: 9f6d446
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Sep 2 15:59:36 2015 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Sep 2 15:59:36 2015 -0700

----------------------------------------------------------------------
 .../cache/tier/sockets/CacheServerTestUtil.java | 33 +------------------
 .../tier/sockets/ClientServerMiscDUnitTest.java | 34 ++++++++++----------
 .../sockets/EventIDVerificationDUnitTest.java   |  2 +-
 .../sockets/HAStartupAndFailoverDUnitTest.java  | 25 --------------
 4 files changed, 19 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1d7601e5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
index 9d1477a..6fd9e1d 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
@@ -64,42 +64,16 @@ public class CacheServerTestUtil extends DistributedTestCase
     super(name);
   }
 
-   
-  
-//  public static void createCacheClient(Properties props, String regionName)
-//      throws Exception {
-//    createCacheClient(props, regionName, getClientProperties(), Boolean.FALSE);
-//  }
   public static void createCacheClient(Pool poolAttr, String regionName)
       throws Exception {
     createCacheClient(poolAttr, regionName, getClientProperties(), Boolean.FALSE);
   }
 
-//  public static void createCacheClient(Properties props, String regionName,
-//      Properties dsProperties) throws Exception {
-//    createCacheClient(props, regionName, dsProperties, Boolean.FALSE);
-//  }
   public static void createCacheClient(Pool poolAttr, String regionName,
       Properties dsProperties) throws Exception {
     createCacheClient(poolAttr, regionName, dsProperties, Boolean.FALSE);
   }
 
-//  public static void createCacheClient(Properties props, String regionName,
-//    Properties dsProperties, Boolean addControlListener) throws Exception {
-//    new CacheServerTestUtil("temp").createCache(dsProperties);
-//    BridgeWriter writer = new BridgeWriter();
-//    writer.init(props);
-//    AttributesFactory factory = new AttributesFactory();
-//    factory.setScope(Scope.LOCAL);
-//    factory.setCacheWriter(writer);
-//    if (addControlListener.booleanValue()) {
-//      factory.addCacheListener(new ControlListener());
-//    }
-//    RegionAttributes attrs = factory.create();
-//    cache.createRegion(regionName, attrs);
-//    pool = (PoolImpl)writer.getConnectionProxy();
-//  }
-  
   public static void createClientCache(Pool poolAttr, String regionName) throws Exception {
     createClientCache(poolAttr, regionName, getClientProperties());
   }
@@ -299,7 +273,7 @@ public class CacheServerTestUtil extends DistributedTestCase
   }
 
   /**
-   * Create client regions each with their own BridgeWriter instance.
+   * Create client regions
    * @param props
    * @param regionName1
    * @param regionName2
@@ -535,11 +509,6 @@ public class CacheServerTestUtil extends DistributedTestCase
     return pool;
   }
 
-//   public static BridgeWriter getWriter()
-//   {
-//     return writer;
-//   }
-
   /**
    * Disables the shuffling of endpoints for a client
    *

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1d7601e5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
index 6fe8b3a..1813123 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
@@ -46,7 +46,7 @@ import java.util.Set;
 import junit.framework.AssertionFailedError;
 
 /**
- * Tests corner cases between Region, BridgeWriter and PoolImpl
+ * Tests client server corner cases between Region and Pool
  *
  * @author Yogesh Mahajan
  *
@@ -356,12 +356,12 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
   }
 
   /**
-   * Test for single BridgeWriter used across two regions: notify by subscription is true.
+   * Test two regions: notify by subscription is true.
    * For region1 the interest list is empty , for region 2 the intetest list is all keys.
    * If an update/create is made on region1 , the client should not receive any.
    * If the create/update is on region2 , the client should receive the update.
    */
-  public void testSameBridgeWriterForTwoRegionHavingDifferentInterestList()
+  public void testForTwoRegionHavingDifferentInterestList()
       throws Exception
   {
     // start server first
@@ -385,7 +385,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
   }
 
   /**
-   * Test for single BridgeWriter used across two regions: notify by subscription is true.
+   * Test two regions: notify by subscription is true.
    * Both the regions have registered interest in all the keys.
    * Now close region1 on the client.
    * The region1 should get removed from the interest list on CCP at server.
@@ -394,7 +394,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
    * ( which is diferent from not receiving a callbak on the client).
    * If an update on region2 is made on the server , then client should receive the calback
    */
-  public void testSameBridgeWriterForTwoRegionHavingALLKEYSInterest()
+  public void testForTwoRegionHavingALLKEYSInterest()
       throws Exception
   {
     // start server first
@@ -411,14 +411,14 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
     verifyUpdatesOnRegion2();
   }
 
-  /** Test for single BridgeWriter used across two regions: notify by subscription is true.
+  /** Test two regions: notify by subscription is true.
    * Both the regions have registered interest in all the keys.
    * Close both the regions. When the last region is closed ,
    * it should close the ConnectionProxy on the client ,
    * close all the server connection threads on the server &
    * remove the CacheClientProxy from the CacheClient notifier
    */
-  public void testRegionCloseWithSameBridgeWriter() throws Exception
+  public void testRegionClose() throws Exception
   {
     // start server first
     PORT1 = initServerCache(true);
@@ -436,7 +436,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
   }
 
   /**
-   * Test for single BridgeWriter used across two regions: notify by
+   * Test two regions: notify by
    * subscription is true. Both the regions have registered interest in all the
    * keys. Destroy region1 on the client. It should reach the server , kill the
    * region on the server , propagate it to the interested clients , but it
@@ -476,12 +476,12 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
   }
 
   /**
-   * Test for single BridgeWriter used across two regions:If notify by
+   * Test two regions:If notify by
    * subscription is false , both the regions should receive invalidates for the
    * updates on server in their respective regions
    *
    */
-  public void testInvalidatesPropagateOnTwoRegionsHavingCommonBridgeWriter()
+  public void testInvalidatesPropagateOnTwoRegions()
       throws Exception
   {
     // start server first
@@ -535,16 +535,16 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
   }
 
   /**
-   * Create cache, create bridge writer, notify-by-subscription=false,
+   * Create cache, create pool, notify-by-subscription=false,
    * create a region and on client and on server.
-   * Do not attach Bridge writer to region ,
+   * Do not attach pool to region ,
    * populate some entries on region both on client and server.
    * Update the entries on server the client.
    * The client should not have entry invalidate.
    *
    * @throws Exception
    */
-  public void testInvalidatesPropagateOnRegionHavingNoBridgeWriter()
+  public void testInvalidatesPropagateOnRegionHavingNoPool()
       throws Exception
   {
     // start server first
@@ -565,7 +565,7 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
       .setPingInterval(2000)
       // .setRetryAttempts(5)
       // .setRetryInterval(2000)
-      .create("testInvalidatesPropagateOnRegionHavingNoBridgeWriter");
+      .create("testInvalidatesPropagateOnRegionHavingNoPool");
 
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.DISTRIBUTED_ACK);
@@ -685,14 +685,14 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
   }
   /**
    * 
-   * Cycling a DistributedSystem with an initialized BridgeWriter causes interest registration NPE
+   * Cycling a DistributedSystem with an initialized pool causes interest registration NPE
    * 
    * Test Scenario:
    *  
    * Create a DistributedSystem (DS1). 
-   * Create a BridgeWriter (BW), initialize (creates a proxy with DS1 memberid) 
+   * Create a pool, initialize (creates a proxy with DS1 memberid) 
    * Disconnect DS1.  Create a DistributedSystem (DS2). 
-   * Create a Region with BW, it attempts to register interest using DS2 memberid, gets NPE.
+   * Create a Region with pool, it attempts to register interest using DS2 memberid, gets NPE.
    *  
    * @throws Exception
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1d7601e5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
index ce88c48..c52e7a5 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
@@ -177,7 +177,7 @@ public class EventIDVerificationDUnitTest extends DistributedTestCase
     ClientServerTestCase.configureConnectionPool(factory, host, new int[] {PORT1,PORT2}, true, -1, 2, null, -1, -1, false, -2);
 
     
-    CacheWriter writer = new CacheWriterAdapter() { // couldn't port this test to pool because it subclasses BridgeWriter
+    CacheWriter writer = new CacheWriterAdapter() {
       public void beforeCreate(EntryEvent event)
       {
         vm0.invoke(EventIDVerificationDUnitTest.class, "setEventIDData",

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1d7601e5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
index 6a6a56f..4242fe0 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
@@ -288,31 +288,6 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase
       verifyDeadAndLiveServers(1,2);
     }
 
-
-  // darrel: this following is an invalid test.
-  // A "primary" is only identified when you have a callback connection
-//     /**
-//      * Tests failover initialization by cache operation Threads on Primary
-//      */
-//     public void testInitiateFailoverByCacheOperationThreads_Primary() throws Exception
-//     {
-//       // create a client with large retry interval for server monitors and no client updater thread
-//       // so that only cache operation can detect a server failure and should initiate failover
-//       createClientCacheWithLargeRetryIntervalAndWithoutCallbackConnection(this.getName());
-//       setClientServerObserver();
-//       server1.invoke(HAStartupAndFailoverDUnitTest.class, "stopServer");
-//       releaseConnection();//Added by Jason
-//       put();
-//       waitForPrimaryIdentification();
-//       unSetClientServerObserver();
-//       verifyDeadAndLiveServers(1,2);
-//     }
-//     public static void releaseConnection() {
-//       Region r1 = cache.getRegion("/" + REGION_NAME);
-//       BridgeWriter bw = (BridgeWriter)r1.getAttributes().getCacheWriter();
-//       bw.release();
-//     }
-
     public static void put()
     {
       try {