You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/06/07 20:54:55 UTC

[40/62] [abbrv] incubator-geode git commit: Merge remote-tracking branch 'origin/develop' into feature/GEODE-837

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
index 1c8b1a3,5c2f723..a806516
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
@@@ -16,38 -16,7 +16,33 @@@
   */
  package com.gemstone.gemfire.internal.cache;
  
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
- 
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
- import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
- import com.gemstone.gemfire.test.junit.categories.DistributedTest;
- 
 +import java.util.Collections;
- import java.util.HashMap;
 +import java.util.HashSet;
- import java.util.Map;
 +import java.util.Set;
 +
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.CacheEvent;
 +import com.gemstone.gemfire.cache.CacheListener;
 +import com.gemstone.gemfire.cache.CacheWriter;
 +import com.gemstone.gemfire.cache.CacheWriterException;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.EntryEvent;
 +import com.gemstone.gemfire.cache.EntryNotFoundException;
 +import com.gemstone.gemfire.cache.InterestPolicy;
 +import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionEvent;
 +import com.gemstone.gemfire.cache.Scope;
 +import com.gemstone.gemfire.cache.SubscriptionAttributes;
 +import com.gemstone.gemfire.cache.TransactionEvent;
 +import com.gemstone.gemfire.cache.TransactionListener;
 +import com.gemstone.gemfire.cache.TransactionWriter;
  import com.gemstone.gemfire.cache.client.ClientCache;
  import com.gemstone.gemfire.cache.client.ClientCacheFactory;
  import com.gemstone.gemfire.cache.client.ClientRegionFactory;
@@@ -61,7 -30,7 +56,6 @@@ import com.gemstone.gemfire.cache.query
  import com.gemstone.gemfire.cache.server.CacheServer;
  import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
  import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
--import com.gemstone.gemfire.cache30.CacheTestCase;
  import com.gemstone.gemfire.distributed.DistributedMember;
  import com.gemstone.gemfire.internal.AvailablePort;
  import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
@@@ -69,33 -38,32 +63,37 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.internal.cache.execute.data.Customer;
  import com.gemstone.gemfire.internal.cache.execute.data.Order;
  import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
 -import com.gemstone.gemfire.test.dunit.*;
 +import com.gemstone.gemfire.test.dunit.Host;
 +import com.gemstone.gemfire.test.dunit.Invoke;
 +import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 +import com.gemstone.gemfire.test.dunit.SerializableCallable;
 +import com.gemstone.gemfire.test.dunit.VM;
 +import com.gemstone.gemfire.test.dunit.Wait;
 +import com.gemstone.gemfire.test.dunit.WaitCriterion;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
- /**
-  *
-  */
 -import java.util.Collections;
 -import java.util.HashSet;
 -import java.util.Set;
 +@Category(DistributedTest.class)
 +public class RemoteCQTransactionDUnitTest extends JUnit4CacheTestCase {
+ 
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 -
 -/**
 - *
 - */
 -public class RemoteCQTransactionDUnitTest extends CacheTestCase {
    final protected String CUSTOMER = "custRegion";
    final protected String ORDER = "orderRegion";
    final protected String D_REFERENCE = "distrReference";
--  
++
++  final CustId expectedCustId = new CustId(6);
++  final Customer expectedCustomer = new Customer("customer6", "address6");
++
    private final SerializableCallable getNumberOfTXInProgress = new SerializableCallable() {
++    @Override
      public Object call() throws Exception {
        TXManagerImpl mgr = getGemfireCache().getTxManager();
        return mgr.hostedTransactionsInProgressForTest();
      }
    };
++
    private final SerializableCallable verifyNoTxState = new SerializableCallable() {
++    @Override
      public Object call() throws Exception {
--      //TXManagerImpl mgr = getGemfireCache().getTxManager();
--      //assertIndexDetailsEquals(0, mgr.hostedTransactionsInProgressForTest());
        final TXManagerImpl mgr = getGemfireCache().getTxManager();
        Wait.waitForCriterion(new WaitCriterion() {
          @Override
@@@ -111,12 -79,12 +109,6 @@@
        return null;
      }
    };
--  /**
--   * @param name
--   */
-   public RemoteCQTransactionDUnitTest() {
-     super();
 -  public RemoteCQTransactionDUnitTest(String name) {
 -    super(name);
--  }
  
    protected enum OP {
      PUT, GET, DESTROY, INVALIDATE, KEYS, VALUES, ENTRIES, PUTALL, GETALL, REMOVEALL
@@@ -124,7 -92,7 +116,6 @@@
    
    @Override
    public final void preTearDownCacheTestCase() throws Exception {
--//    try { Thread.sleep(5000); } catch (InterruptedException e) { } // FOR MANUAL TESTING OF STATS - DON"T KEEP THIS
      try {
        Invoke.invokeInEveryVM(verifyNoTxState);
      } finally {
@@@ -176,6 -144,6 +167,7 @@@
  
    protected void initAccessorAndDataStore(VM accessor, VM datastore, final int redundantCopies) {
      accessor.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          createRegion(true/*accessor*/, redundantCopies, null);
          return null;
@@@ -183,6 -151,6 +175,7 @@@
      });
  
      datastore.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          createRegion(false/*accessor*/, redundantCopies, null);
          populateData();
@@@ -193,6 -161,6 +186,7 @@@
  
    protected void initAccessorAndDataStore(VM accessor, VM datastore1, VM datastore2, final int redundantCopies) {
      datastore2.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          createRegion(false/*accessor*/, redundantCopies, null);
          return null;
@@@ -204,6 -172,6 +198,7 @@@
  
    private void initAccessorAndDataStoreWithInterestPolicy(VM accessor, VM datastore1, VM datastore2, final int redundantCopies) {
      datastore2.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          createRegion(false/*accessor*/, redundantCopies, InterestPolicy.ALL);
          return null;
@@@ -236,8 -204,8 +231,7 @@@
        rContainsVO = rContainsVO && orderRegion.containsValueForKey(o);
      }
      boolean rContainsVR = refRegion.containsValueForKey(custId);
--    
--    
++
      assertEquals(containsKey,rContainsKC);
      assertEquals(containsKey,rContainsKO);
      assertEquals(containsKey,rContainsKR);
@@@ -245,7 -213,7 +239,6 @@@
      assertEquals(containsValue,rContainsVC);
      assertEquals(containsValue,rContainsVO);
      
--    
      if(containsKey) {
        Region.Entry eC =  custRegion.getEntry(custId);
        for (OrderId o : ordersSet) {
@@@ -254,14 -222,14 +247,8 @@@
        Region.Entry eR = refRegion.getEntry(custId);
        assertNotNull(eC);
        assertNotNull(eR);
--//      assertIndexDetailsEquals(1,custRegion.size());
--  //    assertIndexDetailsEquals(1,orderRegion.size());
--    //  assertIndexDetailsEquals(1,refRegion.size());
--      
++
      } else {
--      //assertIndexDetailsEquals(0,custRegion.size());
--      //assertIndexDetailsEquals(0,orderRegion.size());
--      //assertIndexDetailsEquals(0,refRegion.size());
        try {
          Region.Entry eC =  custRegion.getEntry(custId);
          assertNull("should have had an EntryNotFoundException:"+eC,eC);
@@@ -283,12 -251,12 +270,9 @@@
        } catch(EntryNotFoundException enfe) {
          // this is what we expect
        }
--      
      }
--    
    }
  
--
    void verifyAfterCommit(OP op) {
      Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
      Region<CustId, Customer> refRegion = getCache().getRegion(D_REFERENCE);
@@@ -311,22 -279,22 +295,10 @@@
        expectedRef = expectedCust;
        assertNotNull(custRegion.getEntry(custId));
        assertEquals(expectedCust, custRegion.getEntry(custId).getValue());
--      /*
--      assertNotNull(orderRegion.getEntry(orderId));
--      assertIndexDetailsEquals(expectedOrder, orderRegion.getEntry(orderId).getValue());
--      
--      assertNotNull(orderRegion.getEntry(orderId2));
--      assertIndexDetailsEquals(expectedOrder2, orderRegion.getEntry(orderId2).getValue());
--      
--      assertNotNull(orderRegion.getEntry(orderId3));
--      assertIndexDetailsEquals(expectedOrder3, orderRegion.getEntry(orderId3).getValue());
--      */
++
        assertNotNull(refRegion.getEntry(custId));
        assertEquals(expectedRef, refRegion.getEntry(custId).getValue());
        
--      //Set<OrderId> ordersSet = new HashSet<OrderId>();
--      //ordersSet.add(orderId);ordersSet.add(orderId2);ordersSet.add(orderId3);
--      //validateContains(custId, ordersSet, true);
        break;
      case GET:
        expectedCust = custRegion.get(custId);
@@@ -356,8 -324,8 +328,7 @@@
        throw new IllegalStateException();
      }
    }
--  
--  
++
    void verifyAfterRollback(OP op) {
      Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
      Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -415,14 -383,14 +386,12 @@@
        throw new IllegalStateException();
      }
    }
--  
--  
--  
  
++  static abstract class CacheCallback {
  
--  abstract class CacheCallback {
      protected boolean isAccessor;
      protected Exception ex = null;
++
      protected void verifyOrigin(EntryEvent event) {
        try {
          assertEquals(!isAccessor, event.isOriginRemote());
@@@ -430,6 -398,6 +399,7 @@@
          ex = e;
        }
      }
++
      protected void verifyPutAll(EntryEvent event) {
        CustId knownCustId = new CustId(1);
        OrderId knownOrderId = new OrderId(2, knownCustId);
@@@ -442,37 -410,37 +412,46 @@@
          }
        }
      }
--
    }
    
--  class TestCacheListener extends CacheCallback implements CacheListener {
++  static class TestCacheListener extends CacheCallback implements CacheListener {
      TestCacheListener(boolean isAccessor) {
        this.isAccessor = isAccessor;
      }
++    @Override
      public void afterCreate(EntryEvent event) {
        verifyOrigin(event);
        verifyPutAll(event);
      }
++    @Override
      public void afterUpdate(EntryEvent event) {
        verifyOrigin(event);
        verifyPutAll(event);
      }
++    @Override
      public void afterDestroy(EntryEvent event) {
        verifyOrigin(event);
      }
++    @Override
      public void afterInvalidate(EntryEvent event) {
        verifyOrigin(event);
      }
++    @Override
      public void afterRegionClear(RegionEvent event) {
      }
++    @Override
      public void afterRegionCreate(RegionEvent event) {
      }
++    @Override
      public void afterRegionDestroy(RegionEvent event) {
      }
++    @Override
      public void afterRegionInvalidate(RegionEvent event) {
      }
++    @Override
      public void afterRegionLive(RegionEvent event) {
      }
++    @Override
      public void close() {
      }
    }
@@@ -484,6 -452,6 +463,7 @@@
      TestCacheWriter(boolean isAccessor) {
        this.isAccessor = isAccessor;
      }
++    @Override
      public void beforeCreate(EntryEvent event) throws CacheWriterException {
        getGemfireCache().getLogger().info("SWAP:beforeCreate:"+event+" op:"+event.getOperation());
        verifyOrigin(event);
@@@ -493,37 -461,37 +473,45 @@@
      public void setFired(EntryEvent event) {
        wasFired = true;
      }
++    @Override
      public void beforeUpdate(EntryEvent event) throws CacheWriterException {
        getGemfireCache().getLogger().info("SWAP:beforeCreate:"+event+" op:"+event.getOperation());
        verifyOrigin(event);
        verifyPutAll(event);
        setFired(event);
      }
++    @Override
      public void beforeDestroy(EntryEvent event) throws CacheWriterException {
        verifyOrigin(event);
        setFired(event);
      }
++    @Override
      public void beforeRegionClear(RegionEvent event)
          throws CacheWriterException {
        setFired(null);
      }
++    @Override
      public void beforeRegionDestroy(RegionEvent event)
          throws CacheWriterException {
        setFired(null);
      }
++    @Override
      public void close() {
      }
    }
  
--  abstract class txCallback {
++  static abstract class txCallback {
++
      protected boolean isAccessor;
      protected Exception ex = null;
++
      protected void verify(TransactionEvent txEvent) {
        for (CacheEvent e : txEvent.getEvents()) {
          verifyOrigin(e);
          verifyPutAll(e);
        }
      }
++
      private void verifyOrigin(CacheEvent event) {
        try {
          assertEquals(true, event.isOriginRemote()); //change to !isAccessor after fixing #41498
@@@ -531,6 -499,6 +519,7 @@@
          ex = e;
        }
      }
++
      private void verifyPutAll(CacheEvent p_event) {
        if (!(p_event instanceof EntryEvent)) {
          return;
@@@ -549,18 -517,18 +538,23 @@@
      }
    }
    
--  class TestTxListener extends txCallback implements TransactionListener {
++  static class TestTxListener extends txCallback implements TransactionListener {
++
      private boolean listenerInvoked;
++
      TestTxListener(boolean isAccessor) {
        this.isAccessor = isAccessor;
      }
++    @Override
      public void afterCommit(TransactionEvent event) {
        listenerInvoked = true;
        verify(event);
      }
++    @Override
      public void afterFailedCommit(TransactionEvent event) {
        verify(event);
      }
++    @Override
      public void afterRollback(TransactionEvent event) {
        listenerInvoked = true;
        verify(event);
@@@ -568,27 -536,27 +562,29 @@@
      public boolean isListenerInvoked() {
        return this.listenerInvoked;
      }
++    @Override
      public void close() {
      }
    }
  
--  class TestTxWriter extends txCallback implements TransactionWriter {
++  static class TestTxWriter extends txCallback implements TransactionWriter {
      public TestTxWriter(boolean isAccessor) {
        this.isAccessor = isAccessor;
      }
++    @Override
      public void beforeCommit(TransactionEvent event) {
        verify(event);
      }
++    @Override
      public void close() {
      }
    }
  
--
--  
--  final CustId expectedCustId = new CustId(6);
--  final Customer expectedCustomer = new Customer("customer6", "address6");
    class TXFunction implements Function {
++
      static final String id = "TXFunction";
++
++    @Override
      public void execute(FunctionContext context) {
        Region r = null;
        r = getGemfireCache().getRegion(CUSTOMER);
@@@ -597,15 -565,15 +593,19 @@@
        GemFireCacheImpl.getInstance().getLogger().warning(" XXX DOIN A PUT ",new Exception());
        context.getResultSender().lastResult(Boolean.TRUE);
      }
++    @Override
      public String getId() {
        return id;
      }
++    @Override
      public boolean hasResult() {
        return true;
      }
++    @Override
      public boolean optimizeForWrite() {
        return true;
      }
++    @Override
      public boolean isHA() {
        return false;
      }
@@@ -649,8 -617,8 +649,8 @@@
      return expectedSet;
    }
  
++  static class OneUpdateCacheListener extends CacheListenerAdapter {
  
--  class OneUpdateCacheListener extends CacheListenerAdapter {
      boolean success = false;
      
      public boolean getSuccess() {
@@@ -680,7 -648,7 +680,8 @@@
      }
    }
    
--  class OneDestroyAndThenOneCreateCacheWriter extends CacheWriterAdapter {
++  static class OneDestroyAndThenOneCreateCacheWriter extends CacheWriterAdapter {
++
      private boolean oneDestroy;
      private boolean oneCreate;
      
@@@ -725,6 -693,6 +726,7 @@@
  
    protected Integer startServer(VM vm) {
      return (Integer) vm.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
          CacheServer s = getCache().addCacheServer();
@@@ -734,8 -702,8 +736,10 @@@
        }
      });
    }
++
    protected void createClientRegion(VM vm, final int port, final boolean isEmpty, final boolean ri, final boolean CQ) {
      vm.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          ClientCacheFactory ccf = new ClientCacheFactory();
          ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
@@@ -766,28 -734,28 +770,26 @@@
      });
    }
  
--  protected class ClientCQListener implements CqListener {
++  protected static class ClientCQListener implements CqListener {
  
      boolean invoked = false;
++
++    @Override
      public void onError(CqEvent aCqEvent) {
--      // TODO Auto-generated method stub
--      
      }
  
++    @Override
      public void onEvent(CqEvent aCqEvent) {
--      // TODO Auto-generated method stub
        invoked =true;
--      
      }
  
++    @Override
      public void close() {
--      // TODO Auto-generated method stub
--      
      }
--    
    }
    
--protected static class ClientListener extends CacheListenerAdapter {
++  protected static class ClientListener extends CacheListenerAdapter {
++
      boolean invoked = false;
      int invokeCount = 0;
      int invalidateCount = 0;
@@@ -808,6 -776,6 +810,7 @@@
        putAllOp = event.getOperation().isPutAll();
        isOriginRemote = event.isOriginRemote();
      }
++
      @Override
      public void afterUpdate(EntryEvent event) {
      	event.getRegion().getCache().getLogger().warning("ZZZ AFTER UPDATE:"+event.getKey()+" isPutAll:"+event.getOperation().isPutAll()+" op:"+event.getOperation());
@@@ -840,9 -808,9 +843,11 @@@
    }
    
    protected static class ServerListener extends CacheListenerAdapter {
++
      boolean invoked = false;
      int creates;
      int updates;
++
      @Override
      public void afterCreate(EntryEvent event) {
        invoked = true;
@@@ -863,9 -831,8 +868,7 @@@
      }
    }
    
--  private static final String EMPTY_REGION = "emptyRegionName";
--  
 +  @Test
    public void testTXWithCQCommitInDatastoreCQ() throws Exception {
      Host host = Host.getHost(0);
      VM accessor = host.getVM(0);
@@@ -877,6 -844,6 +880,7 @@@
      
      createClientRegion(client, port, false, true, true);
      datastore.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -894,6 -861,6 +898,7 @@@
      
      Thread.sleep(10000);
      client.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -907,8 -874,7 +912,7 @@@
      });
    }
    
--  
 +  @Test
    public void testTXWithCQCommitInDatastoreConnectedToAccessorCQ() throws Exception {
      Host host = Host.getHost(0);
      VM accessor = host.getVM(0);
@@@ -920,6 -886,6 +924,7 @@@
      
      createClientRegion(client, port, false, true, true);
      datastore.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -928,8 -894,8 +933,6 @@@
          OrderId orderId = new OrderId(1, custId);
          getCache().getCacheTransactionManager().begin();
          custRegion.put(custId, new Customer("foo", "bar"));
--//        orderRegion.put(orderId, new Order("fooOrder"));
--//        refRegion.put(custId, new Customer("foo", "bar"));
          getCache().getCacheTransactionManager().commit();
          return null;
        }
@@@ -937,6 -903,6 +940,7 @@@
      
      Thread.sleep(10000);
      client.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -948,9 -914,8 +952,8 @@@
        }
      });
    }
--  
--  
++
 +  @Test
    public void testTXWithCQCommitInDatastoreConnectedToDatastoreCQ() throws Exception {
      Host host = Host.getHost(0);
      VM accessor = host.getVM(0);
@@@ -962,6 -927,6 +965,7 @@@
      
      createClientRegion(client, port, false, true, true);
      datastore.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -970,8 -935,8 +974,6 @@@
          OrderId orderId = new OrderId(1, custId);
          getCache().getCacheTransactionManager().begin();
          custRegion.put(custId, new Customer("foo", "bar"));
--//        orderRegion.put(orderId, new Order("fooOrder"));
--//        refRegion.put(custId, new Customer("foo", "bar"));
          getCache().getCacheTransactionManager().commit();
          return null;
        }
@@@ -979,6 -944,6 +981,7 @@@
      
      Thread.sleep(10000);
      client.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -1003,6 -967,6 +1006,7 @@@
      
      createClientRegion(client, port, false, true, true);
      accessor.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -1011,8 -975,8 +1015,6 @@@
          OrderId orderId = new OrderId(1, custId);
          getCache().getCacheTransactionManager().begin();
          custRegion.put(custId, new Customer("foo", "bar"));
--//        orderRegion.put(orderId, new Order("fooOrder"));
--//        refRegion.put(custId, new Customer("foo", "bar"));
          getCache().getCacheTransactionManager().commit();
          return null;
        }
@@@ -1020,6 -984,6 +1022,7 @@@
      
      Thread.sleep(10000);
      client.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -1044,6 -1007,6 +1047,7 @@@
      
      createClientRegion(client, port, false, true, true);
      accessor.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -1052,8 -1015,8 +1056,6 @@@
          OrderId orderId = new OrderId(1, custId);
          getCache().getCacheTransactionManager().begin();
          custRegion.put(custId, new Customer("foo", "bar"));
--//        orderRegion.put(orderId, new Order("fooOrder"));
--//        refRegion.put(custId, new Customer("foo", "bar"));
          getCache().getCacheTransactionManager().commit();
          return null;
        }
@@@ -1061,6 -1024,6 +1063,7 @@@
      
      Thread.sleep(10000);
      client.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -1072,9 -1035,8 +1075,8 @@@
        }
      });
    }
--  
--  
++
 +  @Test
    public void testCQCommitInDatastoreConnectedToAccessorCQ() throws Exception {
      Host host = Host.getHost(0);
      VM accessor = host.getVM(0);
@@@ -1086,6 -1048,6 +1088,7 @@@
      
      createClientRegion(client, port, false, true, true);
      datastore.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -1094,8 -1056,8 +1097,6 @@@
          OrderId orderId = new OrderId(1, custId);
          getCache().getCacheTransactionManager().begin();
          custRegion.put(custId, new Customer("foo", "bar"));
--//        orderRegion.put(orderId, new Order("fooOrder"));
--//        refRegion.put(custId, new Customer("foo", "bar"));
          getCache().getCacheTransactionManager().commit();
          return null;
        }
@@@ -1103,6 -1065,6 +1104,7 @@@
      
      Thread.sleep(10000);
      client.invoke(new SerializableCallable() {
++      @Override
        public Object call() throws Exception {
          Region<CustId, Customer> custRegion = getCache().getRegion(CUSTOMER);
          Region<OrderId, Order> orderRegion = getCache().getRegion(ORDER);
@@@ -1115,5 -1077,5 +1117,4 @@@
      });
    }
  
--
  }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
index 2e3b9db,7e6d760..ed74c70
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
@@@ -16,40 -16,11 +16,41 @@@
   */
  package com.gemstone.gemfire.internal.cache.ha;
  
- import static org.junit.Assert.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import static com.gemstone.gemfire.test.dunit.Assert.*;
 +
 +import java.io.File;
 +import java.io.IOException;
 +import java.util.ArrayList;
 +import java.util.HashMap;
 +import java.util.Iterator;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Properties;
 +
 +import org.junit.Ignore;
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
  import com.gemstone.gemfire.LogWriter;
 -import com.gemstone.gemfire.cache.*;
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheException;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.DiskStoreFactory;
 +import com.gemstone.gemfire.cache.ExpirationAttributes;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.PoolFactory;
  import com.gemstone.gemfire.cache.client.PoolManager;
 -import com.gemstone.gemfire.cache.query.*;
 +import com.gemstone.gemfire.cache.query.CqAttributes;
 +import com.gemstone.gemfire.cache.query.CqAttributesFactory;
 +import com.gemstone.gemfire.cache.query.CqListener;
 +import com.gemstone.gemfire.cache.query.CqQuery;
 +import com.gemstone.gemfire.cache.query.QueryService;
 +import com.gemstone.gemfire.cache.query.SelectResults;
  import com.gemstone.gemfire.cache.query.cq.dunit.CqQueryTestListener;
  import com.gemstone.gemfire.cache.query.data.Portfolio;
  import com.gemstone.gemfire.cache.server.CacheServer;
@@@ -63,44 -33,48 +63,35 @@@ import com.gemstone.gemfire.internal.ca
  import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
  import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessageImpl;
  import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
 -import com.gemstone.gemfire.test.dunit.*;
 -
 -import java.io.File;
 -import java.io.IOException;
 -import java.util.*;
 -
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
 +import com.gemstone.gemfire.test.dunit.Assert;
 +import com.gemstone.gemfire.test.dunit.Host;
 +import com.gemstone.gemfire.test.dunit.NetworkUtils;
 +import com.gemstone.gemfire.test.dunit.VM;
 +import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 +import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  
  /**
-  * @since 5.7
 - *
 - *
+  * @since GemFire 5.7
 - *
   */
 -public class CQListGIIDUnitTest extends DistributedTestCase {
 -  private final static int CREATE = 0;
 +@Category(DistributedTest.class)
 +public class CQListGIIDUnitTest extends JUnit4DistributedTestCase {
-   private final static int CREATE = 0;
  
++  private final static int CREATE = 0;
    private final static int UPDATE = 1;
--
    private final static int DESTROY = 2;
--
    private final static int INVALIDATE = 3;
--
    private final static int CLOSE = 4;
--
    private final static int REGION_CLEAR = 5;
--
    private final static int REGION_INVALIDATE = 6;
  
    protected static Cache cache = null;
  
    protected static VM serverVM0 = null;
--
    private static VM serverVM1 = null;
--
    protected static VM clientVM1 = null;
--
    protected static VM clientVM2 = null;
  
    private int PORT1;
--
    private int PORT2;
  
    private static final String regionName = "CQListGIIDUnitTest";
@@@ -148,9 -122,17 +139,6 @@@
        "SELECT ALL * FROM /root/" + regions[0]
            + " p where p.ID > 0 and p.status='active'", };
  
 -  /**
 -   * @param name
 -   *          name of the test
 -   */
 -  public CQListGIIDUnitTest(String name) {
 -    super(name);
 -  }
 -
--  /**
--   * Sets up the test.
--   */
    @Override
    public final void postSetUp() throws Exception {
      final Host host = Host.getHost(0);
@@@ -163,9 -145,9 +151,6 @@@
      PORT2 = ((Integer)serverVM1.invoke(() -> CQListGIIDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_ENTRY ))).intValue();
    }
  
--  /**
--   * Tears down the test.
--   */
    @Override
    public final void preTearDown() throws Exception {
      serverVM0.invoke(() -> ConflationDUnitTest.unsetIsSlowStart());
@@@ -279,25 -261,25 +264,21 @@@
     * @see Region#createSubregion(String, RegionAttributes)
     * @see LocalRegion#createSubregion(String, RegionAttributes, InternalRegionArguments)
     */
--  public static Region createSubregion(Region root, String name,
--      RegionAttributes attrs, final InternalRegionArguments internalArgs) throws CacheException
--  {
++  public static Region createSubregion(Region root, String name, RegionAttributes attrs, final InternalRegionArguments internalArgs) throws CacheException {
++    Region value = null;
      if (internalArgs == null) {
--      return root.createSubregion(name, attrs);
++      value = root.createSubregion(name, attrs);
      } else {
        try {
          LocalRegion lr = (LocalRegion) root;
--        return lr.createSubregion(name, attrs, internalArgs);
--      } catch (IOException ioe) {
--        AssertionError assErr = new AssertionError("unexpected exception");
--        assErr.initCause(ioe);
--        throw assErr;
--      } catch (ClassNotFoundException cnfe) {
--        AssertionError assErr = new AssertionError("unexpected exception");
--        assErr.initCause(cnfe);
--        throw assErr;
++        value = lr.createSubregion(name, attrs, internalArgs);
++      } catch (IOException e) {
++        fail("unexpected exception", e);
++      } catch (ClassNotFoundException e) {
++        fail("unexpected exception", e);
        } 
      }
++    return value;
    }
    
    public static void createClientCache(Integer port1, Integer port2,
@@@ -327,9 -309,9 +308,9 @@@
      String host = NetworkUtils.getIPLiteral();
  
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new CQListGIIDUnitTest("temp").createCache(props);
 +    new CQListGIIDUnitTest().createCache(props);
  
      PoolFactory pf = PoolManager.createFactory();
      int endPointCount = 1;
@@@ -392,12 -374,12 +373,7 @@@
        assertTrue("newCq() state mismatch", cq1.getState().isStopped());
      }
      catch (Exception ex) {
--      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("CqService is :" + cqService);
--      ex.printStackTrace();
--      AssertionError err = new AssertionError("Failed to create CQ " + cqName
--          + " . ");
--      err.initCause(ex);
--      throw err;
++      fail("Failed to create CQ " + cqName + " . ", ex);
      }
    }
  
@@@ -423,11 -405,11 +399,7 @@@
        }
      }
      catch (Exception ex) {
--      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("CqService is :" + cqService);
--      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().error(ex);
--      AssertionError err = new AssertionError("Failed to execute  CQ " + cqName);
--      err.initCause(ex);
--      throw err;
++      fail("Failed to execute  CQ " + cqName, ex);
      }
  
      if (initialResults.booleanValue()) {
@@@ -437,20 -419,20 +409,11 @@@
          cqResults = cq1.executeWithInitialResults();
        }
        catch (Exception ex) {
--        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("CqService is :" + cqService);
--        ex.printStackTrace();
--        AssertionError err = new AssertionError("Failed to execute  CQ "
--            + cqName);
--        err.initCause(ex);
--        throw err;
++        fail("Failed to execute  CQ " + cqName, ex);
        }
        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("initial result size = " + cqResults.size());
        assertTrue("executeWithInitialResults() state mismatch", cq1.getState()
            .isRunning());
--      // if (expectedResultsSize >= 0) {
--      // assertIndexDetailsEquals("unexpected results size", expectedResultsSize, cqResults
--      // .size());
--      // }
      }
      else {
  
@@@ -458,12 -440,12 +421,7 @@@
          cq1.execute();
        }
        catch (Exception ex) {
--        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("CqService is :" + cqService);
--        ex.printStackTrace();
--        AssertionError err = new AssertionError("Failed to execute  CQ "
--            + cqName);
--        err.initCause(ex);
--        throw err;
++        fail("Failed to execute  CQ " + cqName, ex);
        }
        assertTrue("execute() state mismatch", cq1.getState().isRunning());
      }
@@@ -477,10 -459,10 +435,8 @@@
        region.getAttributesMutator().setCacheListener(
            new CertifiableTestCacheListener(com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter()));
      }
--    catch (Exception cqe) {
--      AssertionError err = new AssertionError("Failed to get Region.");
--      err.initCause(cqe);
--      throw err;
++    catch (Exception e) {
++      fail("Failed to get Region.", e);
      }
  
      try {
@@@ -491,9 -473,9 +447,7 @@@
        region.registerInterest(list);
      }
      catch (Exception ex) {
--      AssertionError err = new AssertionError("Failed to Register InterestList");
--      err.initCause(ex);
--      throw err;
++      fail("Failed to Register InterestList", ex);
      }
    }
  
@@@ -508,7 -490,7 +462,6 @@@
        cqService = cache.getQueryService();
      }
      catch (Exception cqe) {
--      cqe.printStackTrace();
        Assert.fail("Failed to getCQService.", cqe);
      }
  
@@@ -550,7 -532,7 +503,6 @@@
        case REGION_INVALIDATE:
          listener.waitForRegionInvalidate();
          break;
--
      }
    }
  
@@@ -593,9 -575,12 +545,9 @@@
      }
    }
  
-   @Ignore("TODO")
 -  /**
 -   *
 -   *
 -   * @throws Exception
 -   */
 -  public void _testSpecificClientCQIsGIIedPart1() throws Exception {
++  @Ignore("TODO: test is disabled")
 +  @Test
 +  public void testSpecificClientCQIsGIIedPart1() throws Exception {
      Integer size = Integer.valueOf(10);
      // slow start for dispatcher
      serverVM0.invoke(() -> ConflationDUnitTest.setIsSlowStart( "30000" ));
@@@ -634,10 -619,9 +586,8 @@@
     * This test asserts that cq list of a client for an event is not lost if that
     * client's queue has been GII'ed to a server where that event already
     * existed.
--   *
--   * @throws Exception
     */
 +  @Test
    public void testClientCQNotLostAtGIIReceiver() throws Exception {
      Integer size = Integer.valueOf(10);
      VM serverVM2 = clientVM2;
@@@ -651,32 -635,32 +601,32 @@@
      createClientCache(Integer.valueOf(PORT1), Integer.valueOf(PORT2),
          Integer.valueOf(port3), "1");
      try {
--    clientVM1.invoke(() -> CQListGIIDUnitTest.createClientCache( Integer.valueOf(PORT1), Integer.valueOf(port3),
--            Integer.valueOf(PORT2), "1" ));
--    try {
--    createCQ("testSpecificClientCQIsGIIed_0", cqs[0]);
--    executeCQ("testSpecificClientCQIsGIIed_0", Boolean.FALSE);
--    clientVM1.invoke(() -> CQListGIIDUnitTest.createCQ(
--        "testSpecificClientCQIsGIIed_0", cqs[0] ));
--    clientVM1.invoke(() -> CQListGIIDUnitTest.executeCQ(
--        "testSpecificClientCQIsGIIed_0", Boolean.FALSE ));
--
--    serverVM0.invoke(() -> CQListGIIDUnitTest.putEntries(
--        regions[0], size ));
--
--    serverVM1.invoke(() -> CQListGIIDUnitTest.VerifyCUMCQList(
--        size, Integer.valueOf(1) ));
--
--    serverVM2.invoke(() -> CQListGIIDUnitTest.stopServer());
--    Thread.sleep(3000); // TODO: Find a better 'n reliable alternative
--
--    serverVM0.invoke(() -> CQListGIIDUnitTest.VerifyCUMCQList(
--      size, Integer.valueOf(2) ));
--    serverVM1.invoke(() -> CQListGIIDUnitTest.VerifyCUMCQList(
--        size, Integer.valueOf(2) ));
--    } finally {
--      clientVM1.invoke(() -> CQListGIIDUnitTest.destroyClientPool());
--    }
++      clientVM1.invoke(() -> CQListGIIDUnitTest.createClientCache( Integer.valueOf(PORT1), Integer.valueOf(port3),
++              Integer.valueOf(PORT2), "1" ));
++      try {
++        createCQ("testSpecificClientCQIsGIIed_0", cqs[0]);
++        executeCQ("testSpecificClientCQIsGIIed_0", Boolean.FALSE);
++        clientVM1.invoke(() -> CQListGIIDUnitTest.createCQ(
++            "testSpecificClientCQIsGIIed_0", cqs[0] ));
++        clientVM1.invoke(() -> CQListGIIDUnitTest.executeCQ(
++            "testSpecificClientCQIsGIIed_0", Boolean.FALSE ));
++
++        serverVM0.invoke(() -> CQListGIIDUnitTest.putEntries(
++            regions[0], size ));
++
++        serverVM1.invoke(() -> CQListGIIDUnitTest.VerifyCUMCQList(
++            size, Integer.valueOf(1) ));
++
++        serverVM2.invoke(() -> CQListGIIDUnitTest.stopServer());
++        Thread.sleep(3000); // TODO: Find a better 'n reliable alternative
++
++        serverVM0.invoke(() -> CQListGIIDUnitTest.VerifyCUMCQList(
++          size, Integer.valueOf(2) ));
++        serverVM1.invoke(() -> CQListGIIDUnitTest.VerifyCUMCQList(
++            size, Integer.valueOf(2) ));
++      } finally {
++        clientVM1.invoke(() -> CQListGIIDUnitTest.destroyClientPool());
++      }
  
      } finally {
        destroyClientPool();
@@@ -721,7 -705,7 +671,7 @@@
        }
      }
      catch (Exception e) {
--      fail("failed in stopOneBridgeServer()" + e);
++      fail("failed in stopOneBridgeServer()", e);
      }
    }
  
@@@ -734,7 -718,7 +684,7 @@@
        }
      }
      catch (Exception e) {
--      fail("failed in stopServer()" + e);
++      fail("failed in stopServer()", e);
      }
    }
  
@@@ -747,7 -731,7 +697,7 @@@
        }
      }
      catch (Exception e) {
--      fail("failed in startServer()" + e);
++      fail("failed in startServer()", e);
      }
    }
  
@@@ -777,7 -761,7 +727,7 @@@
            Thread.sleep(50);
          }
          catch (InterruptedException ie) {
--          fail("interrupted");
++          fail("interrupted", ie);
          }
        }
        logger.fine("Exiting sleep, time elapsed was: "
@@@ -788,7 -772,7 +738,7 @@@
        }
      }
      catch (Exception e) {
--      fail("failed in waitTillMessagesAreDispatched()" + e);
++      fail("failed in waitTillMessagesAreDispatched()", e);
      }
    }
  
@@@ -798,5 -782,5 +748,4 @@@
        cache.getDistributedSystem().disconnect();
      }
    }
--
  }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
index 5ad551e,1da4e96..c8812bb
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
@@@ -16,28 -16,8 +16,29 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.io.DataInput;
 +import java.io.DataOutput;
 +import java.io.IOException;
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
  import com.gemstone.gemfire.DeltaTestImpl;
 -import com.gemstone.gemfire.cache.*;
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.AttributesMutator;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.EntryEvent;
 +import com.gemstone.gemfire.cache.InterestPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
 +import com.gemstone.gemfire.cache.SubscriptionAttributes;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.client.internal.PoolImpl;
  import com.gemstone.gemfire.cache.query.CqAttributes;
@@@ -65,10 -45,9 +65,10 @@@ import com.gemstone.gemfire.test.junit.
  /**
   * Test client to server flow for delta propogation
   * 
-  * @since 6.1
+  * @since GemFire 6.1
   */
 -public class ClientToServerDeltaDUnitTest extends DistributedTestCase {
 +@Category(DistributedTest.class)
 +public class ClientToServerDeltaDUnitTest extends JUnit4DistributedTestCase {
    /*
     * Test configuration one server one client also 2 server 2 client
     */
@@@ -77,11 -56,11 +77,8 @@@
    private static LogWriterI18n logger = null;
  
    VM server = null;
--
    VM server2 = null;
--
    VM client = null;
--
    VM client2 = null;
  
    private static final String KEY1 = "DELTA_KEY_1";
@@@ -124,11 -103,11 +121,6 @@@
  
    public static String LAST_KEY = "LAST_KEY";
    
--  /** constructor */
-   public ClientToServerDeltaDUnitTest() {
-     super();
 -  public ClientToServerDeltaDUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    public final void postSetUp() throws Exception {
      disconnectAllFromDS();
@@@ -323,7 -299,7 +315,6 @@@
  
    /*
     * put delta ; not previous deltas
--   * 
     */
    private static void putDelta(String key) {
      Region r = cache.getRegion(REGION_NAME);
@@@ -364,7 -340,7 +355,6 @@@
  
    /*
     * put delta full cycle
--   * 
     */
    private static void put(String key) {
      Region r = cache.getRegion(REGION_NAME);
@@@ -464,9 -440,9 +454,9 @@@
      secondUpdate = null;
      error = false;
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME,
+     props.setProperty(DELTA_PROPAGATION,
          enableDelta.toString());
 -    new ClientToServerDeltaDUnitTest("temp").createCache(props);
 +    new ClientToServerDeltaDUnitTest().createCache(props);
      AttributesFactory factory = new AttributesFactory();
      factory.setScope(Scope.DISTRIBUTED_ACK);
      factory.setConcurrencyChecksEnabled(true);
@@@ -486,10 -462,10 +476,12 @@@
      AttributesMutator am = region.getAttributesMutator();
      if (attachListener) {
        am.addCacheListener(new CacheListenerAdapter() {
++        @Override
          public void afterCreate(EntryEvent event) {
            create++;
          }
  
++        @Override
          public void afterUpdate(EntryEvent event) {
            switch (updates) {
              case 0:
@@@ -510,6 -486,6 +502,7 @@@
        });
      } else if (!isEmpty){
        am.addCacheListener(new CacheListenerAdapter() {
++        @Override
          public void afterCreate(EntryEvent event) {
            switch (create) {
              case 1:
@@@ -572,9 -548,9 +565,9 @@@
      error = false;
      lastKeyReceived = false;
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new ClientToServerDeltaDUnitTest("temp").createCache(props);
 +    new ClientToServerDeltaDUnitTest().createCache(props);
      pool = (PoolImpl)PoolManager.createFactory().addServer(host, port.intValue())
          .setThreadLocalConnections(true).setMinConnections(2)
          .setSubscriptionEnabled(enableSubscription).setSubscriptionRedundancy(0)
@@@ -599,6 -575,6 +592,7 @@@
      region = cache.createRegion(REGION_NAME, attrs);
      if (attachListener) {
        region.getAttributesMutator().addCacheListener(new CacheListenerAdapter() {
++        @Override
          public void afterCreate(EntryEvent event) {
            create++;
            if (LAST_KEY.equals(event.getKey())) {          
@@@ -606,6 -582,6 +600,7 @@@
            };
          }
  
++        @Override
          public void afterUpdate(EntryEvent event) {
            switch (updates) {
              case 0:
@@@ -631,6 -607,6 +626,7 @@@
      if (isCq) {
        CqAttributesFactory cqf = new CqAttributesFactory();
        CqListenerAdapter cqlist = new CqListenerAdapter() {
++        @Override
          public void onEvent(CqEvent cqEvent) {
            Object key = cqEvent.getKey();
            if (LAST_KEY.equals(key)) {
@@@ -640,6 -616,6 +636,7 @@@
                + cqEvent.getNewValue() + ")");
          }
          
++        @Override
          public void onError(CqEvent cqEvent) {
            logger.fine("CQ error received for key: " + cqEvent.getKey());
          }
@@@ -686,6 -662,6 +683,7 @@@
        lastKeyReceived = false;
      }
    }
++
    /**
     * This test does the following for single key:<br>
     * 1)Verifies that cacheless client calls toDelta <br>
@@@ -734,16 -708,15 +732,14 @@@
      
      server2.invoke(() -> ClientToServerDeltaDUnitTest.checkTodeltaCounter( new Integer(0)));
      server2.invoke(() -> ClientToServerDeltaDUnitTest.checkFromdeltaCounter());
--    
    }
    
    /**
     * This test does verifies that server with empty data policy sends deltas to 
     * the client which can handle deltas. Server sends full values which can not
     * handle deltas.
--   * 
     */
 +  @Test
    public void testClientsConnectedToEmptyServer() {
      Integer PORT1 = ((Integer)server.invoke(() -> ClientToServerDeltaDUnitTest.createServerCache( Boolean.FALSE,
              Boolean.TRUE ))).intValue();
@@@ -763,7 -736,7 +759,6 @@@
      
      client2.invoke(() -> ClientToServerDeltaDUnitTest.waitForLastKey());    
      client2.invoke(() -> ClientToServerDeltaDUnitTest.checkDeltaInvoked(new Integer(deltaSent)));
--    
    }
    
    /**
@@@ -788,7 -760,7 +783,6 @@@
      
      server2.invoke(() -> ClientToServerDeltaDUnitTest.checkTodeltaCounter( new Integer(0)));
      server2.invoke(() -> ClientToServerDeltaDUnitTest.checkFromdeltaCounter());
--    
    }
  
    /**
@@@ -799,10 -771,9 +793,8 @@@
     * test ensures that the client2 gets the update event. This implies that
     * server2 clones the old value prior to applying delta received from server1
     * and then processes the CQ.
--   * 
--   * @throws Exception
     */
 +  @Test
    public void testC2CDeltaPropagationWithCQ() throws Exception {
      initialise(false/* clone */, new String[] { CQs[1] }, true/* CQ */,
          true/* RI */, true/* enable delta */);
@@@ -823,10 -794,9 +815,8 @@@
     * client is not interested in that event but is getting the event only
     * because the event satisfies a CQ which the client has registered with the
     * server.
--   * 
--   * @throws Exception
     */
 +  @Test
    public void testC2CDeltaPropagationWithCQWithoutRI() throws Exception {
      initialise(false/* clone */, new String[] { CQs[1] }, true/* CQ */,
          false/* RI */, true/* enable delta */);
@@@ -957,9 -925,9 +947,11 @@@
  
    public static void waitForLastKey() {
      WaitCriterion wc = new WaitCriterion() {
++      @Override
        public boolean done() {
          return ClientToServerDeltaDUnitTest.lastKeyReceived;
        }
++      @Override
        public String description() {
          return "Last key NOT received.";
        }
@@@ -968,17 -936,17 +960,20 @@@
    }
    
    static class CSDeltaTestImpl extends DeltaTestImpl {
++
      int deltaSent = 0;
      int deltaApplied = 0;
  
      public CSDeltaTestImpl() {
      }
  
++    @Override
      public void toDelta(DataOutput out) throws IOException {
        super.toDelta(out);
        deltaSent++;
      }
  
++    @Override
      public void fromDelta(DataInput in) throws IOException {
        super.fromDelta(in);      
        deltaApplied++;
@@@ -992,6 -960,6 +987,7 @@@
        return deltaApplied;
      }
  
++    @Override
      public String toString() {
        return "CSDeltaTestImpl[deltaApplied=" + deltaApplied + "]"
            + super.toString();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
index 6b292de,acb4094..b9faf69
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
@@@ -16,25 -16,8 +16,26 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
 +import static org.junit.Assert.*;
 +
 +import java.util.List;
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
  import com.gemstone.gemfire.DeltaTestImpl;
 -import com.gemstone.gemfire.cache.*;
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.EntryEvent;
 +import com.gemstone.gemfire.cache.GemFireCache;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.RegionFactory;
 +import com.gemstone.gemfire.cache.RegionShortcut;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.Pool;
  import com.gemstone.gemfire.cache.query.CqAttributesFactory;
  import com.gemstone.gemfire.cache.query.CqEvent;
@@@ -64,7 -48,7 +64,7 @@@ public class DeltaPropagationWithCQDUni
  
    private static Pool pool = null;
  
--  private static String regionName = "CQWithInterestDUnitTest_region";
++  private static String regionName = DeltaPropagationWithCQDUnitTest.class.getSimpleName() + "_region";
  
    protected VM server1 = null;
  
@@@ -131,9 -121,9 +131,11 @@@
          "SAMPLE_KEY", "NEW_VALUE"));
      // 6. Wait for some time
      WaitCriterion wc = new WaitCriterion() {
++      @Override
        public boolean done() {
          return cqEvents == 2 && cqErrors == 0;
        }
++      @Override
        public String description() {
          return "Expected 2 cqEvents and 0 cqErrors, but found " + cqEvents
              + " cqEvents and " + cqErrors + " cqErrors";
@@@ -181,11 -170,11 +183,13 @@@
  
    public static void verifyCqListeners(final Integer events) throws Exception {
      WaitCriterion wc = new WaitCriterion() {
++      @Override
        public String description() {
          return "Expected " + events + " listener invocations but found "
              + (cqEvents + cqErrors);
        }
  
++      @Override
        public boolean done() {
          System.out.println("verifyCqListeners: expected total="+events+"; cqEvents="+cqEvents+"; cqErrors="+cqErrors);
          return (cqEvents + cqErrors) == events;
@@@ -242,9 -231,9 +246,6 @@@
      assertNotNull(ds);
      cache = CacheFactory.create(ds);
      assertNotNull(cache);
--//    Properties props = new Properties();
- //    props.setProperty(DistributionConfig.MCAST_PORT_NAME, "10333");
 -    //    props.setProperty(DistributionConfig.DistributedSystemConfigProperties.MCAST_PORT, "10333");
--//    cache = new CacheFactory(props).create();
      RegionFactory<Object, Object> rf = ((Cache)cache)
          .createRegionFactory(RegionShortcut.REPLICATE);
      rf.create(regionName);
@@@ -257,9 -246,9 +258,9 @@@
    public static void createClientCache(String host, Integer port, Boolean doRI)
        throws Exception {
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    DeltaPropagationWithCQDUnitTest instance = new DeltaPropagationWithCQDUnitTest("temp");
 +    DeltaPropagationWithCQDUnitTest instance = new DeltaPropagationWithCQDUnitTest();
      DistributedSystem ds = instance.getSystem(props);
      ds.disconnect();
      ds = instance.getSystem(props);
@@@ -271,28 -260,28 +272,23 @@@
          true, 1, 2, null, 1000, 250, false, -2);
  
      factory.setScope(Scope.LOCAL);
--//    String poolName = "CQWithInterestDUnitTest_pool";
--//    cache = new ClientCacheFactory(new Properties()).create();
--//    ClientRegionFactory<Object, Object> rf = ((ClientCache)cache)
--//        .createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
--//    PoolFactory pf = PoolManager.createFactory().addServer(host, port)
--//        .setSubscriptionEnabled(true);
--//    pool = pf.create(poolName);
--//    rf.setPoolName(poolName);
--//    rf.addCacheListener(new CacheListenerAdapter<Object, Object>() {
      factory.addCacheListener(new CacheListenerAdapter<Object, Object>() {
++      @Override
        public void afterCreate(EntryEvent<Object, Object> event) {
          totalEvents++;
        }
  
++      @Override
        public void afterUpdate(EntryEvent<Object, Object> event) {
          totalEvents++;
        }
  
++      @Override
        public void afterDestroy(EntryEvent<Object, Object> event) {
          totalEvents++;
        }
  
++      @Override
        public void afterInvalidate(EntryEvent<Object, Object> event) {
          totalEvents++;
        }
@@@ -312,6 -301,6 +308,7 @@@
      CqListenerAdapter[] cqListeners = new CqListenerAdapter[numOfListeners];
      for (int i = 0; i < numOfListeners; i++) {
        cqListeners[i] = new CqListenerAdapter() {
++        @Override
          public void onEvent(CqEvent event) {
            System.out.println("CqListener.onEvent invoked.  Event="+event);
            if (event.getDeltaValue() != null) {
@@@ -332,6 -321,6 +329,7 @@@
            System.out.println("cqEvents is now " + cqEvents);
          }
  
++        @Override
          public void onError(CqEvent event) {
            System.out.println("CqListener.onError invoked.  Event="+event);
            if (event.getDeltaValue() != null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
index 51b82a9,1488bce..17103c1
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
@@@ -16,21 -16,7 +16,22 @@@
   */
  package com.gemstone.gemfire.internal.cache.tier.sockets;
  
- import static org.junit.Assert.*;
 -import com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import static com.gemstone.gemfire.test.dunit.Assert.*;
 +
 +import java.util.Iterator;
 +import java.util.Properties;
 +
 +import org.junit.Test;
 +import org.junit.experimental.categories.Category;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.Scope;
  import com.gemstone.gemfire.cache.client.Pool;
  import com.gemstone.gemfire.cache.client.PoolManager;
  import com.gemstone.gemfire.cache.client.internal.PoolImpl;
@@@ -40,39 -26,36 +41,35 @@@ import com.gemstone.gemfire.cache.query
  import com.gemstone.gemfire.cache.query.QueryService;
  import com.gemstone.gemfire.cache.server.CacheServer;
  import com.gemstone.gemfire.distributed.DistributedSystem;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
  import com.gemstone.gemfire.internal.AvailablePort;
  import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 -import com.gemstone.gemfire.test.dunit.*;
 -
 -import java.util.Iterator;
 -import java.util.Properties;
 +import com.gemstone.gemfire.test.dunit.Host;
- import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 +import com.gemstone.gemfire.test.dunit.NetworkUtils;
 +import com.gemstone.gemfire.test.dunit.VM;
 +import com.gemstone.gemfire.test.dunit.Wait;
 +import com.gemstone.gemfire.test.dunit.WaitCriterion;
 +import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 +import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+ 
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
 -import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
  /**
   * This tests the flag setting for region ( DataPolicy as Empty ) for
   * Delta propogation for a client while registering CQ
-- * 
   */
 -public class DeltaToRegionRelationCQRegistrationDUnitTest extends DistributedTestCase {
 -  private static Cache cache = null;
 +@Category(DistributedTest.class)
 +public class DeltaToRegionRelationCQRegistrationDUnitTest extends JUnit4DistributedTestCase {
-   private static Cache cache = null;
  
--  VM server = null;
++  private static Cache cache = null;
  
--  VM client = null;
-- 
--  VM server2 = null;
--  
--  VM client2 = null;
++  private VM server = null;
++  private VM client = null;
++  private VM server2 = null;
++  private VM client2 = null;
   
    private int PORT1 ;
--  
    private int PORT2 ;
    
--  private static PoolImpl p = null; 
++  private static PoolImpl p = null;
++
    /*
     * name of the region with data policy empty
     */
@@@ -82,6 -65,6 +79,7 @@@
     * name of the region whose data policy is not empty
     */
    private static final String REGION_NAME2 = "DeltaToRegionRelationCQRegistration_region2";
++
    /*
     * to detect primary server
     */
@@@ -112,11 -95,11 +110,6 @@@
    private static final String cqName3="cqNamethird";
    private static final String cqName4="cqNameFourth";
    
--  /** constructor */
-   public DeltaToRegionRelationCQRegistrationDUnitTest() {
-     super();
 -  public DeltaToRegionRelationCQRegistrationDUnitTest(String name) {
 -    super(name);
--  }
--
    @Override
    public final void postSetUp() throws Exception {
      disconnectAllFromDS();
@@@ -315,7 -292,7 +308,7 @@@
      CqAttributesFactory cqf = new CqAttributesFactory();
      CqAttributes cqa = cqf.create();
      
--//  Create and Execute CQ.
++    //  Create and Execute CQ.
      try {
        CqQuery cq1 = cqService.newCq(name, Cquery, cqa);
        assertTrue("newCq() state mismatch", cq1.getState().isStopped());
@@@ -324,11 -301,11 +317,7 @@@
        else  
          cq1.execute();
      } catch (Exception ex){
--      LogWriterUtils.getLogWriter().info("CqService is :" + cqService);
--      ex.printStackTrace();
--      AssertionError err = new AssertionError("Failed to create CQ " + cqName1 + " . ");
--      err.initCause(ex);
--      throw err;
++      fail("Failed to create CQ " + cqName1, ex);
      }
      
      CqQuery cQuery = cqService.getCq(name);
@@@ -337,7 -314,7 +326,6 @@@
      }
    }
  
--  
    /*
     * register cq from pool
     */
@@@ -356,7 -333,7 +344,7 @@@
      CqAttributesFactory cqf = new CqAttributesFactory();
      CqAttributes cqa = cqf.create();
      
--//  Create and Execute CQ.
++    //  Create and Execute CQ.
      try {
        CqQuery cq1 = cqService.newCq(name, Cquery, cqa);
        assertTrue("newCq() state mismatch", cq1.getState().isStopped());
@@@ -365,11 -342,11 +353,7 @@@
        else  
          cq1.execute();
      } catch (Exception ex){
--      LogWriterUtils.getLogWriter().info("CqService is :" + cqService);
--      ex.printStackTrace();
--      AssertionError err = new AssertionError("Failed to create CQ " + cqName1 + " . ");
--      err.initCause(ex);
--      throw err;
++      fail("Failed to create CQ " + cqName1, ex);
      }
      
      CqQuery cQuery = cqService.getCq(name);
@@@ -382,7 -359,7 +366,6 @@@
      checkNumberOfClientProxies(1);
      CacheClientProxy proxy = getClientProxy();
      assertNotNull(proxy);
--//  wait
      WaitCriterion wc = new WaitCriterion() {
        public boolean done() {
          return DeltaToRegionRelationCQRegistrationDUnitTest.getClientProxy()
@@@ -420,7 -397,7 +403,6 @@@
      CacheClientProxy proxy = getClientProxy();
      assertNotNull(proxy);
  
--//  wait
      WaitCriterion wc = new WaitCriterion() {
        public boolean done() {
          return DeltaToRegionRelationCQRegistrationDUnitTest.getClientProxy()
@@@ -449,6 -426,6 +431,7 @@@
          .intValue() == 0);
  
    }
++
    /*
     * create server cache
     */
@@@ -471,15 -448,15 +454,16 @@@
      return new Integer(server.getPort());
  
    }
++
    /*
     * create client cache
     */
    public static void createClientCache(String host, Integer port)
        throws Exception {
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new DeltaToRegionRelationCQRegistrationDUnitTest("temp").createCache(props);
 +    new DeltaToRegionRelationCQRegistrationDUnitTest().createCache(props);
      Pool p = PoolManager.createFactory().addServer(host, port.intValue())
          .setThreadLocalConnections(true).setMinConnections(3)
          .setSubscriptionEnabled(true).setSubscriptionRedundancy(0)
@@@ -513,9 -490,9 +497,9 @@@
    public static void createClientCacheWithNoRegion(String host, Integer port)
        throws Exception {
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new DeltaToRegionRelationCQRegistrationDUnitTest("temp").createCache(props);
 +    new DeltaToRegionRelationCQRegistrationDUnitTest().createCache(props);
      p = (PoolImpl)PoolManager.createFactory().addServer(host, port.intValue())
          .setThreadLocalConnections(true).setMinConnections(3)
          .setSubscriptionEnabled(true).setSubscriptionRedundancy(0)
@@@ -524,15 -501,15 +508,16 @@@
          // .setRetryAttempts(5)
          .create("DeltaToRegionRelationCQRegistrationTestPool");
    }
++
    /*
     * create client cache and return's primary server location object (primary)
     */
    public static Integer createClientCache2(String host1, String host2,
        Integer port1, Integer port2) throws Exception {
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new DeltaToRegionRelationCQRegistrationDUnitTest("temp").createCache(props);
 +    new DeltaToRegionRelationCQRegistrationDUnitTest().createCache(props);
      PoolImpl p = (PoolImpl)PoolManager.createFactory().addServer(host1,
          port1.intValue()).addServer(host2, port2.intValue())
          .setThreadLocalConnections(true).setMinConnections(3)
@@@ -558,7 -535,7 +543,6 @@@
      return new Integer(p.getPrimaryPort());
    }
  
--  
    /*
     * create client cache and return's primary server location object (primary)
     * no region created on client
@@@ -566,9 -543,9 +550,9 @@@
    public static Integer createClientCache3(String host1, String host2,
        Integer port1, Integer port2) throws Exception {
      Properties props = new Properties();
-     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
-     props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+     props.setProperty(MCAST_PORT, "0");
+     props.setProperty(LOCATORS, "");
 -    new DeltaToRegionRelationCQRegistrationDUnitTest("temp").createCache(props);
 +    new DeltaToRegionRelationCQRegistrationDUnitTest().createCache(props);
      p = (PoolImpl)PoolManager.createFactory().addServer(host1,
          port1.intValue()).addServer(host2, port2.intValue())
          .setThreadLocalConnections(true).setMinConnections(3)
@@@ -617,6 -594,6 +601,7 @@@
      assertNotNull(bridgeServer);
      return bridgeServer;
    }
++
    /*
     * number of client proxies are presert
     */
@@@ -624,6 -601,6 +609,7 @@@
      return getBridgeServer().getAcceptor().getCacheClientNotifier()
          .getClientProxies().size();
    }
++
    /*
     * if expected number of proxies are not present and wait
     */
@@@ -647,6 -624,6 +633,7 @@@
    public static void stopCacheServer(){
      getBridgeServer().stop();
    }
++
    /*
     * initial setup required for testcase with out failover
     */
@@@ -666,6 -643,6 +653,7 @@@
          .invoke(() -> DeltaToRegionRelationCQRegistrationDUnitTest.createClientCacheWithNoRegion( NetworkUtils.getServerHostName(server.getHost()),
                  new Integer(PORT1) ));
    }
++
    /*
     * kind of teardown for testcase without failover
     */
@@@ -674,7 -651,7 +662,8 @@@
      client.invoke(() -> DeltaToRegionRelationCQRegistrationDUnitTest.closeCache());
      // then close the servers
      server.invoke(() -> DeltaToRegionRelationCQRegistrationDUnitTest.closeCache());
--  }  
++  }
++
    /*
     * initial setup required for testcase with failover
     */
@@@ -738,6 -715,6 +727,7 @@@
        server.invoke(() -> DeltaToRegionRelationCQRegistrationDUnitTest.validationOnServerForCqRegistrationFromPool());
      }
    }
++
    /*
     * kind of teardown for testcase with failover
     */
@@@ -748,6 -725,6 +738,7 @@@
      server.invoke(() -> DeltaToRegionRelationCQRegistrationDUnitTest.closeCache());
      server2.invoke(() -> DeltaToRegionRelationCQRegistrationDUnitTest.closeCache());
    }
++
    /*
     * create cache with properties
     */
@@@ -757,6 -734,6 +748,4 @@@
      cache = CacheFactory.create(ds);
      assertNotNull(cache);
    }
--  
-- 
  }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java
index 115cd30,caf7136..87985fb
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientCrashDUnitTest.java
@@@ -27,12 -22,16 +27,18 @@@ import com.gemstone.gemfire.test.junit.
  /**
   * Class <code>DurableClientCrashDUnitTest</code> tests durable client
   * functionality when clients crash.
++<<<<<<< HEAD
 + *
 + * @since 5.2
++=======
+  * 
+  * 
+  * @since GemFire 5.2
++>>>>>>> origin/develop
   */
 +@Category(DistributedTest.class)
  public class DurableClientCrashDUnitTest extends DurableClientTestCase {
  
 -  public DurableClientCrashDUnitTest(String name) {
 -    super(name);
 -  }
 -
    @Override
    protected final void postSetUpDurableClientTestCase() throws Exception {
      configureClientStop1();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientNetDownDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientNetDownDUnitTest.java
index d6d71f5,fd43e0b..11ff132
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientNetDownDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientNetDownDUnitTest.java
@@@ -24,11 -21,15 +24,16 @@@ import com.gemstone.gemfire.test.junit.
   * Class <code>DurableClientCrashDUnitTest</code> tests durable client
   * functionality when clients are disconnected from servers.
   * 
++<<<<<<< HEAD
 + * @since 5.2
++=======
+  * 
+  * @since GemFire 5.2
++>>>>>>> origin/develop
   */
 +@Category(DistributedTest.class)
  public class DurableClientNetDownDUnitTest extends DurableClientCrashDUnitTest {
  
 -  public DurableClientNetDownDUnitTest(String name) {
 -    super(name);
 -  }
 -  
    @Override
    protected final void preTearDownDurableClientTestCase() throws Exception {
      //ensure that the test flag is no longer set in this vm