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:55:13 UTC
[58/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-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
index 230a17f,49270bc..af4ed74
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
@@@ -187,9 -196,9 +188,7 @@@ public class AsynchIndexMaintenanceJUni
region.put(""+(i+1), new Portfolio(i+1));
idSet.add((i+1) + "");
}
-- Thread.sleep(10000);
-- //assertIndexDetailsEquals(0, this.getIndexSize(ri));
--
++ Thread.sleep(10000); // TODO: delete this sleep
}
@Test
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
index fdaa607,f5e7f8d..395405a
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
@@@ -16,22 -16,6 +16,23 @@@
*/
package com.gemstone.gemfire.cache.query.internal.index;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.query.QueryService;
@@@ -42,13 -26,25 +43,10 @@@ import com.gemstone.gemfire.cache.query
import com.gemstone.gemfire.cache.query.internal.DefaultQuery.TestHook;
import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import util.TestException;
-
-import java.util.*;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
-import static org.junit.Assert.*;
-
--/**
-- *
-- *
-- */
@Category(IntegrationTest.class)
public class CompactRangeIndexJUnitTest {
++
private QueryTestUtils utils;
private Index index;
@@@ -80,7 -76,7 +78,7 @@@
executeRangeQueryWithoutDistinct(9);
}
-- /*
++ /**
* Tests adding entries to compact range index where the key is null
* fixes bug 47151 where null keyed entries would be removed after being added
*/
@@@ -101,10 -97,10 +99,12 @@@
SelectResults results = (SelectResults) qs.newQuery("Select * from /exampleRegion r where r.status = null").execute();
assertEquals("Null matched Results expected", numObjects, results.size());
}
--
-- //Tests race condition where we possibly were missing remove calls due to transitioning
-- //to an empty index elem before adding the entries
-- //the fix is to add the entries to the elem and then transition to that elem
++
++ /**
++ * Tests race condition where we possibly were missing remove calls due to transitioning
++ * to an empty index elem before adding the entries
++ * the fix is to add the entries to the elem and then transition to that elem
++ */
@Test
public void testCompactRangeIndexMemoryIndexStoreMaintenance() throws Exception {
try {
@@@ -159,9 -155,9 +159,11 @@@
}
}
-- //Tests race condition when we are transitioning index collection from elem array to concurrent hash set
-- //The other thread could remove from the empty concurrent hash set.
-- //Instead we now set a token, do all the puts into a collection and then unsets the token to the new collection
++ /**
++ * Tests race condition when we are transitioning index collection from elem array to concurrent hash set
++ * The other thread could remove from the empty concurrent hash set.
++ * Instead we now set a token, do all the puts into a collection and then unsets the token to the new collection
++ */
@Test
public void testMemoryIndexStoreMaintenanceTransitionFromElemArrayToTokenToConcurrentHashSet() throws Exception {
try {
@@@ -274,7 -270,7 +276,7 @@@
}
}
-- private class MemoryIndexStoreREToIndexElemTestHook implements TestHook {
++ private static class MemoryIndexStoreREToIndexElemTestHook implements TestHook {
private CountDownLatch readyToStartRemoveLatch;
private CountDownLatch waitForRemoveLatch;
@@@ -319,12 -315,12 +321,13 @@@
}
}
}
--
--
-- //Test hook that waits for another thread to begin removing
-- //The current thread should then continue to set the token
-- //then continue and convert to chs while holding the lock to the elem array still
-- //After the conversion of chs, the lock is released and then remove can proceed
++
++ /**
++ * Test hook that waits for another thread to begin removing
++ * The current thread should then continue to set the token
++ * then continue and convert to chs while holding the lock to the elem array still
++ * After the conversion of chs, the lock is released and then remove can proceed
++ */
private class MemoryIndexStoreIndexElemToTokenToConcurrentHashSetTestHook implements TestHook {
private CountDownLatch waitForRemoveLatch;
@@@ -338,10 -334,10 +341,12 @@@
waitForRetry = new CountDownLatch(1);
readyToStartRemoveLatch = new CountDownLatch(1);
}
++
++ @Override
public void doTestHook(int spot) {
--
}
++ @Override
public void doTestHook(String description) {
try {
if (description.equals("ATTEMPT_REMOVE")) {
@@@ -371,8 -367,8 +376,6 @@@
}
}
--
--
private void putValues(int num) {
Region region = utils.getRegion("exampleRegion");
for (int i = 1; i <= num; i++) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
index 511d0e2,de87304..0061ec3
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
@@@ -41,24 -30,14 +41,25 @@@ import com.gemstone.gemfire.cache.query
import com.gemstone.gemfire.cache.query.partitioned.PRQueryDUnitHelper;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
+ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.CachedDeserializable;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.internal.cache.Token;
import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
-import com.gemstone.gemfire.test.dunit.*;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+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.SerializableRunnableIF;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-import org.junit.experimental.categories.Category;
-
-import java.util.Collection;
/**
* This test is similar to {@link ConcurrentIndexUpdateWithoutWLDUnitTest} except
@@@ -114,13 -92,13 +115,6 @@@ public class ConcurrentIndexUpdateWithI
}
}
-- /**
-- * @param name
-- */
- public ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest() {
- super();
- public ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest(String name) {
- super(name);
-- }
--
@Override
public final void preSetUp() throws Exception {
Invoke.invokeInEveryVM(new CacheSerializableRunnable("Set INPLACE_OBJECT_MODIFICATION false") {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
index 826bacc,cd18314..791327c
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
@@@ -42,30 -30,23 +42,31 @@@ import com.gemstone.gemfire.cache.query
import com.gemstone.gemfire.cache.query.partitioned.PRQueryDUnitHelper;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
+ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.CachedDeserializable;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.internal.cache.Token;
import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.util.ArrayList;
-import java.util.Collection;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+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.SerializableRunnableIF;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
- *
* During validation all region operations are paused for a while. Validation
* happens multiple time during one test run on a fixed time interval.
- *
- *
*/
-public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
- DistributedTestCase {
+@Category(DistributedTest.class)
+public class ConcurrentIndexUpdateWithoutWLDUnitTest extends JUnit4DistributedTestCase {
PRQueryDUnitHelper helper = new PRQueryDUnitHelper();
private static String regionName = "Portfolios";
@@@ -127,8 -115,7 +128,9 @@@
if (region != null) region.destroyRegion();
}
}
++
// Tests on Local/Replicated Region
+ @Test
public void testCompactRangeIndex() {
// Create a Local Region.
Host host = Host.getHost(0);
@@@ -445,13 -427,13 +447,10 @@@
/**
* This validator will iterate over RegionEntries and verify their corresponding
* index key and entry presence in index valuesToEntriesMap.
-- *
-- *
*/
-- public class IndexValidator {
++ private static class IndexValidator {
public IndexValidator() {
--
}
private boolean isValidationInProgress;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
index 65355d8,5f8080b..790421e
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
@@@ -16,54 -16,28 +16,51 @@@
*/
package com.gemstone.gemfire.cache.query.internal.index;
- 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.HashMap;
+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.CacheException;
+import com.gemstone.gemfire.cache.CacheTransactionManager;
+import com.gemstone.gemfire.cache.CommitConflictException;
+import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.Index;
+import com.gemstone.gemfire.cache.query.Query;
+import com.gemstone.gemfire.cache.query.QueryService;
+import com.gemstone.gemfire.cache.query.QueryTestUtils;
+import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.query.Struct;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.data.Position;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
--import com.gemstone.gemfire.cache30.CacheTestCase;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Properties;
-
-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.DistributedTestUtils;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+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;
-public class CopyOnReadIndexDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class CopyOnReadIndexDUnitTest extends JUnit4CacheTestCase {
VM vm0;
VM vm1;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
index c9106f6,839f81b..7e84eb8
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
@@@ -20,16 -20,6 +20,17 @@@
*/
package com.gemstone.gemfire.cache.query.internal.index;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.Collection;
+import java.util.Properties;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java
index beae31e,e14df54..6f151bd
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java
@@@ -16,14 -16,6 +16,15 @@@
*/
package com.gemstone.gemfire.cache.query.internal.index;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
index 0e8c5e6,0929567..a6ff920
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
@@@ -16,57 -16,43 +16,46 @@@
*/
package com.gemstone.gemfire.cache.query.internal.index;
- 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.io.IOException;
+import java.util.HashMap;
+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.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.Region;
+import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.query.data.PortfolioPdx;
- import com.gemstone.gemfire.cache.query.dunit.RemoteQueryDUnitTest;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
--import com.gemstone.gemfire.cache30.CacheTestCase;
- import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.*;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
+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.cache.internal.JUnit4CacheTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.MCAST_PORT;
-
-/**
- *
- */
@Category(DistributedTest.class)
-@Ignore("Test was disabled by renaming to DisabledTest")
-public class PutAllWithIndexPerfDUnitTest extends CacheTestCase {
+public class PutAllWithIndexPerfDUnitTest extends JUnit4CacheTestCase {
/** The port on which the bridge server was started in this VM */
private static int bridgeServerPort;
static long timeWithoutStructTypeIndex = 0;
static long timeWithStructTypeIndex = 0;
- public PutAllWithIndexPerfDUnitTest() {
- super();
- public PutAllWithIndexPerfDUnitTest(String name) {
- super(name);
-- }
--
@Override
public final void postSetUp() throws Exception {
disconnectAllFromDS();
@@@ -77,8 -63,6 +66,8 @@@
disconnectAllFromDS();
}
- @Ignore("TODO")
++ @Ignore("TODO: test is disabled")
+ @Test
public void testPutAllWithIndexes() {
final String name = "testRegion";
final Host host = Host.getHost(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
index 241aeb6,241aeb6..6b6623e
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryDUnitHelper.java
@@@ -86,25 -86,25 +86,15 @@@ import com.gemstone.gemfire.util.test.T
/**
* This is a helper class for the various Partitioned Query DUnit Test Cases
-- *
*/
++public class PRQueryDUnitHelper implements Serializable {
--public class PRQueryDUnitHelper implements Serializable
--{
-- /**
-- * constructor *
-- *
-- * @param name
-- */
static Cache cache = null;
++
public static void setCache(Cache cache) {
PRQueryDUnitHelper.cache = cache;
}
-- public PRQueryDUnitHelper() {
--
-- }
--
public static Cache getCache() {
return cache;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
index ea90c14,e8fac48..f1ee791
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34387DUnitTest.java
@@@ -44,10 -35,9 +44,10 @@@ import com.gemstone.gemfire.test.dunit.
/**
* Test create + localDestroy for bug 34387
*
- * @since 5.0
+ * @since GemFire 5.0
*/
-public class Bug34387DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug34387DUnitTest extends JUnit4CacheTestCase {
// private transient Region r;
// private transient DistributedMember otherId;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java
index 2a902b5,2d1dcf4..3fc35af
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug34948DUnitTest.java
@@@ -48,13 -39,12 +48,13 @@@ import com.gemstone.gemfire.test.dunit.
/**
* Test to make sure cache values are lazily deserialized
*
- * @since 5.0
+ * @since GemFire 5.0
*/
-public class Bug34948DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug34948DUnitTest extends JUnit4CacheTestCase {
- public Bug34948DUnitTest(String name) {
- super(name);
+ public Bug34948DUnitTest() {
+ super();
}
////////////////////// Test Methods //////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java
index ecf5625,9714bdd..02f065d
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug35214DUnitTest.java
@@@ -50,10 -41,9 +50,10 @@@ import com.gemstone.gemfire.test.dunit.
/**
* Make sure entry expiration does not happen during gii for bug 35214
*
- * @since 5.0
+ * @since GemFire 5.0
*/
-public class Bug35214DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug35214DUnitTest extends JUnit4CacheTestCase {
protected volatile int expirationCount = 0;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java
index d00fbc6,2c76556..da33c71
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38013DUnitTest.java
@@@ -47,13 -38,12 +47,13 @@@ import com.gemstone.gemfire.test.dunit.
/**
* Test to make sure PR cache values are lazily deserialized
*
- * @since 5.0
+ * @since GemFire 5.0
*/
-public class Bug38013DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug38013DUnitTest extends JUnit4CacheTestCase {
- public Bug38013DUnitTest(String name) {
- super(name);
+ public Bug38013DUnitTest() {
+ super();
}
////////////////////// Test Methods //////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
index 4d80f1f,49a6ce6..830eead
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
@@@ -16,59 -16,36 +16,58 @@@
*/
package com.gemstone.gemfire.cache30;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.CopyHelper;
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache.InterestResultPolicy;
+import com.gemstone.gemfire.cache.PartitionAttributesFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.BucketRegion;
import com.gemstone.gemfire.internal.cache.BucketRegion.RawValue;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.internal.cache.CachedDeserializable;
+import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
+import com.gemstone.gemfire.internal.cache.EventID;
+import com.gemstone.gemfire.internal.cache.KeyInfo;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketVisitor;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessageImpl;
-import com.gemstone.gemfire.test.dunit.*;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+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.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
- * @since bugfix5.7
- *
+ * @since GemFire bugfix5.7
*/
+@Category(DistributedTest.class)
public class Bug38741DUnitTest extends ClientServerTestCase {
-- private static final long serialVersionUID = 1L;
protected RegionAttributes getRegionAttributes() {
AttributesFactory factory = new AttributesFactory();
@@@ -80,9 -61,8 +79,9 @@@
* Test that CopyOnRead doesn't cause {@link HARegionQueue#peek()} to create a copy,
* assuming that creating copies performs a serialize and de-serialize operation.
* @throws Exception when there is a failure
- * @since bugfix5.7
+ * @since GemFire bugfix5.7
*/
+ @Test
public void testCopyOnReadWithBridgeServer() throws Exception {
final Host h = Host.getHost(0);
final VM client = h.getVM(2);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java
index 15e008b,798fc1b..338a842
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheCloseDUnitTest.java
@@@ -39,13 -30,12 +39,13 @@@ import com.gemstone.gemfire.cache.Regio
/**
* Test to make sure cache close is working.
*
- * @since 3.0
+ * @since GemFire 3.0
*/
-public class CacheCloseDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class CacheCloseDUnitTest extends JUnit4CacheTestCase {
- public CacheCloseDUnitTest(String name) {
- super(name);
+ public CacheCloseDUnitTest() {
+ super();
}
private RegionAttributes createAtts(List callbacks) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheListenerTestCase.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLoaderTestCase.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
index d9320e6,212c5a8..8802328
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
@@@ -16,45 -16,31 +16,36 @@@
*/
package com.gemstone.gemfire.cache30;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
--import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
++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.io.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FilenameFilter;
+import java.io.IOException;
import java.util.Properties;
import java.util.regex.Pattern;
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.logging.InternalLogWriter;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
/**
* Test to make sure cache close is working.
*
- * @since 6.5
+ * @since GemFire 6.5
*/
-public class CacheLogRollDUnitTest extends CacheTestCase {
-
- public CacheLogRollDUnitTest(String name) {
- super(name);
- }
-
- ////////////////////// Test Methods //////////////////////
+@Category(DistributedTest.class)
+public class CacheLogRollDUnitTest extends JUnit4CacheTestCase {
- public CacheLogRollDUnitTest() {
- super();
- }
-
- ////////////////////// Test Methods //////////////////////
-
private void logAndRollAndVerify(String baseLogName,
DistributedSystem ds,String mainId) throws FileNotFoundException, IOException {
String logfile = baseLogName+".log";
@@@ -241,11 -226,11 +232,11 @@@
for(int i=0;i<10;i++) {
ds = this.getSystem(props);
ds.disconnect();
-- }
++ }
-- /*
-- * This was throwing NPEs until my fix...
-- */
++ /*
++ * This was throwing NPEs until my fix...
++ */
}
@Category(FlakyTest.class) // GEODE-674: possible disk pollution, file size sensitive
@@@ -306,7 -290,7 +297,6 @@@
assertTrue("We are hoping that:"+lfl+" exists",f1l.exists());
ds.disconnect();
}
--
}
@Category(FlakyTest.class) // GEODE-677: possible disk pollution, file size sensitive
@@@ -387,76 -370,74 +377,75 @@@
}
@Category(FlakyTest.class) // GEODE-676: possible disk pollution, file size sensitive
+ @Test
public void testLogFileLayoutAndRolling() throws Exception {
String baseLogName = "tacos";
-- Properties props = new Properties();
--
-- String logfile = baseLogName+".log";
- props.put("log-file", logfile);
- props.put("log-file-size-limit", "1");
- props.put("log-level", "config");
-
- DistributedSystem ds = getSystem(props);
- InternalDistributedSystem ids = (InternalDistributedSystem) ds;
- assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
++ Properties props = new Properties();
+
- // Lets figure out the mainId we start with
- String mainId;
- {
- final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
- File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
- public boolean accept(File d, String name) {
- return mainIdPattern.matcher(name).matches();
- }
- });
- assertEquals(1, metaLogs.length);
- String f = metaLogs[0].getName();
- int idx = f.lastIndexOf("-");
- int idx2 = f.lastIndexOf(".");
- mainId = f.substring(idx+1, idx2);
- }
- ds.getProperties();
- logAndRollAndVerify(baseLogName, ds, mainId);
++ String logfile = baseLogName+".log";
+ props.put(LOG_FILE, logfile);
+ props.put(LOG_FILE_SIZE_LIMIT, "1");
+ props.put(LOG_LEVEL, "config");
- DistributedSystem ds = getSystem(props);
- InternalDistributedSystem ids = (InternalDistributedSystem) ds;
- assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
++ DistributedSystem ds = getSystem(props);
++ InternalDistributedSystem ids = (InternalDistributedSystem) ds;
++ assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
+
- // Lets figure out the mainId we start with
- String mainId;
- {
- final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
- File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
- public boolean accept(File d, String name) {
- return mainIdPattern.matcher(name).matches();
- }
- });
- assertEquals(1, metaLogs.length);
- String f = metaLogs[0].getName();
- int idx = f.lastIndexOf("-");
- int idx2 = f.lastIndexOf(".");
- mainId = f.substring(idx+1, idx2);
- }
- ds.getProperties();
- logAndRollAndVerify(baseLogName, ds, mainId);
-
++ // Lets figure out the mainId we start with
++ String mainId;
++ {
++ final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
++ File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
++ public boolean accept(File d, String name) {
++ return mainIdPattern.matcher(name).matches();
++ }
++ });
++ assertEquals(1, metaLogs.length);
++ String f = metaLogs[0].getName();
++ int idx = f.lastIndexOf("-");
++ int idx2 = f.lastIndexOf(".");
++ mainId = f.substring(idx+1, idx2);
++ }
++ ds.getProperties();
++ logAndRollAndVerify(baseLogName, ds, mainId);
}
@Category(FlakyTest.class) // GEODE-675: possible disk pollution, file size sensitive
+ @Test
public void testSecurityLogFileLayoutAndRolling() throws Exception {
String baseLogName = "securitytacos";
-- Properties props = new Properties();
--
-- String logfile = baseLogName+".log";
-- String sec_logfile = "sec_"+baseLogName+".log";
- props.put("log-file", logfile);
- props.put("log-file-size-limit", "1");
- props.put("log-level", "config");
- props.put("security-log-file", sec_logfile);
- props.put("security-log-level", "config");
++ Properties props = new Properties();
++
++ String logfile = baseLogName+".log";
++ String sec_logfile = "sec_"+baseLogName+".log";
+ props.put(LOG_FILE, logfile);
+ props.put(LOG_FILE_SIZE_LIMIT, "1");
+ props.put(LOG_LEVEL, "config");
+ props.put(SECURITY_LOG_FILE, sec_logfile);
+ props.put(SECURITY_LOG_LEVEL, "config");
-- DistributedSystem ds = getSystem(props);
-- InternalDistributedSystem ids = (InternalDistributedSystem) ds;
-- assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
-- assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getSecurityLogWriter()).getLogWriterLevel());
++ DistributedSystem ds = getSystem(props);
++ InternalDistributedSystem ids = (InternalDistributedSystem) ds;
++ assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
++ assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getSecurityLogWriter()).getLogWriterLevel());
-- // Lets figure out the mainId we start with
-- String mainId;
-- {
-- final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
-- File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
-- public boolean accept(File d, String name) {
-- return mainIdPattern.matcher(name).matches();
-- }
-- });
-- assertEquals(1, metaLogs.length);
-- String f = metaLogs[0].getName();
-- int idx = f.lastIndexOf("-");
-- int idx2 = f.lastIndexOf(".");
-- mainId = f.substring(idx+1, idx2);
-- }
-- ds.getProperties();
-- SecurityLogAndRollAndVerify(baseLogName, ds, mainId);
++ // Lets figure out the mainId we start with
++ String mainId;
++ {
++ final Pattern mainIdPattern = Pattern.compile("meta-" + baseLogName + "-\\d+.log");
++ File[] metaLogs = new File(".").listFiles(new FilenameFilter() {
++ public boolean accept(File d, String name) {
++ return mainIdPattern.matcher(name).matches();
++ }
++ });
++ assertEquals(1, metaLogs.length);
++ String f = metaLogs[0].getName();
++ int idx = f.lastIndexOf("-");
++ int idx2 = f.lastIndexOf(".");
++ mainId = f.substring(idx+1, idx2);
++ }
++ ds.getProperties();
++ SecurityLogAndRollAndVerify(baseLogName, ds, mainId);
}
String getLogContents(String logfile) throws FileNotFoundException,IOException {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
index 441f99a,af604f2..b923ece
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
@@@ -27,30 -29,8 +27,30 @@@ import static org.junit.Assert.*
import java.util.Properties;
import java.util.Set;
-public class CacheMapTxnDUnitTest extends DistributedTestCase{
-
+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.CacheTransactionManager;
+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.UnsupportedOperationInTransactionException;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+
+@Category(DistributedTest.class)
+public class CacheMapTxnDUnitTest extends JUnit4DistributedTestCase { // TODO: reformat
-
++
protected static Cache cache;
protected static Properties props = new Properties();
static DistributedSystem ds = null;
@@@ -82,9 -67,9 +82,9 @@@
public static void createCache(){
try{
- // props.setProperty("mcast-port", "1234");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "1234");
// ds = DistributedSystem.connect(props);
- ds = (new CacheMapTxnDUnitTest("temp")).getSystem(props);
+ ds = (new CacheMapTxnDUnitTest()).getSystem(props);
cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
@@@ -93,7 -78,7 +93,7 @@@
region = cache.createRegion("map", attr);
} catch (Exception ex){
-- ex.printStackTrace();
++ throw new AssertionError(ex);
}
}
@@@ -102,7 -87,7 +102,7 @@@
cache.close();
ds.disconnect();
} catch (Exception ex){
-- ex.printStackTrace();
++ throw new AssertionError(ex);
}
}
@@@ -264,8 -245,8 +264,7 @@@
}
catch(Exception ex){
-- ex.printStackTrace();
-- fail("failed in commitTxn");
++ throw new AssertionError(ex);
}
finally{
if(cacheTxnMgr.exists()){
@@@ -369,8 -350,8 +368,7 @@@
}
catch(Exception ex){
-- ex.printStackTrace();
-- fail("failed in rollbackTxn");
++ throw new AssertionError(ex);
}
finally{
if(cacheTxnMgr.exists()){
@@@ -414,8 -395,8 +412,7 @@@
}
catch(Exception ex){
cacheTxnMgr = null;
-- ex.printStackTrace();
-- fail("failed in rollbackTxnClear");
++ throw new AssertionError(ex);
}
}//end of rollbackTxnClear
@@@ -466,8 -447,8 +463,7 @@@
}
catch(Exception ex){
-- ex.printStackTrace();
-- fail("failed in miscMethodsOwner");
++ throw new AssertionError(ex);
}
finally{
if(cacheTxnMgr.exists()){
@@@ -507,8 -488,8 +503,7 @@@
}
catch(Exception ex){
-- ex.printStackTrace();
-- fail("failed in miscMethodsNotOwner");
++ throw new AssertionError(ex);
}
}//end of miscMethodsNotOwner
@@@ -523,8 -504,8 +518,7 @@@
obj = region.put(ob, str);
}
}catch(Exception ex){
-- ex.printStackTrace();
-- fail("Failed while region.put");
++ throw new AssertionError(ex);
}
return obj;
}
@@@ -534,7 -515,7 +528,7 @@@
try{
obj = region.get(ob);
} catch(Exception ex){
-- fail("Failed while region.get");
++ throw new AssertionError(ex);
}
return obj;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
index 25056a1,c133d5c..3e9fffb
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
@@@ -16,132 -16,107 +16,117 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
- 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 com.gemstone.gemfire.cache.*;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
++import static com.gemstone.gemfire.test.dunit.Assert.*;
+
+import java.util.Properties;
+
++import org.junit.Test;
++
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache.DataPolicy;
- import com.gemstone.gemfire.cache.RegionAttributes;
- import com.gemstone.gemfire.cache.RegionExistsException;
- import com.gemstone.gemfire.cache.MembershipAttributes;
+import com.gemstone.gemfire.cache.LossAction;
++import com.gemstone.gemfire.cache.MembershipAttributes;
++import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.ResumptionAction;
+import com.gemstone.gemfire.cache.Scope;
- import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.CachePerfStats;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
++import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
- @Category(DistributedTest.class)
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
-
-public class CacheRegionsReliablityStatsCheckDUnitTest extends CacheTestCase {
- public CacheRegionsReliablityStatsCheckDUnitTest(String name) {
- super(name);
- }
+public class CacheRegionsReliablityStatsCheckDUnitTest extends JUnit4CacheTestCase {
- public CacheRegionsReliablityStatsCheckDUnitTest() {
- super();
- }
-
- /**The tests check to see if all the reliablity stats are working
- * fine and asserts their values to constants.
- *
- * */
- @Test
- public void testRegionsReliablityStats() throws Exception, RegionExistsException{
- final String rr1 = "roleA";
- final String regionNoAccess = "regionNoAccess";
- final String regionLimitedAccess = "regionLimitedAccess";
- final String regionFullAccess = "regionFullAccess";
- //final String regionNameRoleA = "roleA";
- String requiredRoles[] = { rr1};
- Cache myCache = getCache();
-
- MembershipAttributes ra = new MembershipAttributes(requiredRoles,
- LossAction.NO_ACCESS, ResumptionAction.NONE);
-
- AttributesFactory fac = new AttributesFactory();
- fac.setMembershipAttributes(ra);
- fac.setScope(Scope.DISTRIBUTED_ACK);
- fac.setDataPolicy(DataPolicy.REPLICATE);
-
- RegionAttributes attr = fac.create();
- myCache.createRegion(regionNoAccess, attr);
-
- ra = new MembershipAttributes(requiredRoles,
- LossAction.LIMITED_ACCESS, ResumptionAction.NONE);
- fac = new AttributesFactory();
- fac.setMembershipAttributes(ra);
- fac.setScope(Scope.DISTRIBUTED_ACK);
- fac.setDataPolicy(DataPolicy.REPLICATE);
- attr = fac.create();
- myCache.createRegion(regionLimitedAccess, attr);
-
- ra = new MembershipAttributes(requiredRoles,
- LossAction.FULL_ACCESS, ResumptionAction.NONE);
- fac = new AttributesFactory();
- fac.setMembershipAttributes(ra);
- fac.setScope(Scope.DISTRIBUTED_ACK);
- fac.setDataPolicy(DataPolicy.REPLICATE);
- attr = fac.create();
- myCache.createRegion(regionFullAccess, attr);
-
- CachePerfStats stats = ((GemFireCacheImpl)myCache).getCachePerfStats();
-
- assertEquals(stats.getReliableRegionsMissingNoAccess(), 1);
- assertEquals(stats.getReliableRegionsMissingLimitedAccess(), 1);
- assertEquals(stats.getReliableRegionsMissingFullAccess(), 1);
- assertEquals(stats.getReliableRegionsMissing(), (stats.getReliableRegionsMissingNoAccess() +
- stats.getReliableRegionsMissingLimitedAccess() + stats.getReliableRegionsMissingFullAccess() ));
-
-
- Host host = Host.getHost(0);
- VM vm1 = host.getVM(1);
-
- SerializableRunnable roleAPlayer = new CacheSerializableRunnable(
- "ROLEAPLAYER") {
- public void run2() throws CacheException
- {
-
- Properties props = new Properties();
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- props.setProperty(DistributionConfig.ROLES_NAME, rr1);
-
- getSystem(props);
- Cache cache = getCache();
- AttributesFactory fac = new AttributesFactory();
- fac.setScope(Scope.DISTRIBUTED_ACK);
- fac.setDataPolicy(DataPolicy.REPLICATE);
-
- RegionAttributes attr = fac.create();
- cache.createRegion(regionNoAccess, attr);
- cache.createRegion(regionLimitedAccess, attr);
- cache.createRegion(regionFullAccess, attr);
-
-
- }
-
- };
-
- vm1.invoke(roleAPlayer);
-
- assertEquals(stats.getReliableRegionsMissingNoAccess(), 0);
- assertEquals(stats.getReliableRegionsMissingLimitedAccess(), 0);
- assertEquals(stats.getReliableRegionsMissingFullAccess(), 0);
- assertEquals(stats.getReliableRegionsMissing(), (stats.getReliableRegionsMissingNoAccess() +
- stats.getReliableRegionsMissingLimitedAccess() + stats.getReliableRegionsMissingFullAccess() ));
-
-
- }
-
+
+ /**
+ * The tests check to see if all the reliablity stats are working
+ * fine and asserts their values to constants.
+ */
- public void testRegionsReliablityStats() throws Exception, RegionExistsException {
++ @Test
++ public void testRegionsReliablityStats() throws Exception {
+ final String rr1 = "roleA";
+ final String regionNoAccess = "regionNoAccess";
+ final String regionLimitedAccess = "regionLimitedAccess";
+ final String regionFullAccess = "regionFullAccess";
+ //final String regionNameRoleA = "roleA";
+ String requiredRoles[] = { rr1 };
+ Cache myCache = getCache();
+
+ MembershipAttributes ra = new MembershipAttributes(requiredRoles,
+ LossAction.NO_ACCESS, ResumptionAction.NONE);
+
+ AttributesFactory fac = new AttributesFactory();
+ fac.setMembershipAttributes(ra);
+ fac.setScope(Scope.DISTRIBUTED_ACK);
+ fac.setDataPolicy(DataPolicy.REPLICATE);
+
+ RegionAttributes attr = fac.create();
+ myCache.createRegion(regionNoAccess, attr);
+
+ ra = new MembershipAttributes(requiredRoles,
+ LossAction.LIMITED_ACCESS, ResumptionAction.NONE);
+ fac = new AttributesFactory();
+ fac.setMembershipAttributes(ra);
+ fac.setScope(Scope.DISTRIBUTED_ACK);
+ fac.setDataPolicy(DataPolicy.REPLICATE);
+ attr = fac.create();
+ myCache.createRegion(regionLimitedAccess, attr);
+
+ ra = new MembershipAttributes(requiredRoles,
+ LossAction.FULL_ACCESS, ResumptionAction.NONE);
+ fac = new AttributesFactory();
+ fac.setMembershipAttributes(ra);
+ fac.setScope(Scope.DISTRIBUTED_ACK);
+ fac.setDataPolicy(DataPolicy.REPLICATE);
+ attr = fac.create();
+ myCache.createRegion(regionFullAccess, attr);
+
+ CachePerfStats stats = ((GemFireCacheImpl) myCache).getCachePerfStats();
+
+ assertEquals(stats.getReliableRegionsMissingNoAccess(), 1);
+ assertEquals(stats.getReliableRegionsMissingLimitedAccess(), 1);
+ assertEquals(stats.getReliableRegionsMissingFullAccess(), 1);
+ assertEquals(stats.getReliableRegionsMissing(), (stats.getReliableRegionsMissingNoAccess() +
+ stats.getReliableRegionsMissingLimitedAccess() + stats.getReliableRegionsMissingFullAccess()));
+
+ Host host = Host.getHost(0);
+ VM vm1 = host.getVM(1);
+
+ SerializableRunnable roleAPlayer = new CacheSerializableRunnable(
+ "ROLEAPLAYER") {
+ public void run2() throws CacheException {
+
+ Properties props = new Properties();
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(ROLES, rr1);
+
+ getSystem(props);
+ Cache cache = getCache();
+ AttributesFactory fac = new AttributesFactory();
+ fac.setScope(Scope.DISTRIBUTED_ACK);
+ fac.setDataPolicy(DataPolicy.REPLICATE);
+
+ RegionAttributes attr = fac.create();
+ cache.createRegion(regionNoAccess, attr);
+ cache.createRegion(regionLimitedAccess, attr);
+ cache.createRegion(regionFullAccess, attr);
+
+ }
+
+ };
+
+ vm1.invoke(roleAPlayer);
+
+ assertEquals(stats.getReliableRegionsMissingNoAccess(), 0);
+ assertEquals(stats.getReliableRegionsMissingLimitedAccess(), 0);
+ assertEquals(stats.getReliableRegionsMissingFullAccess(), 0);
+ assertEquals(stats.getReliableRegionsMissing(), (stats.getReliableRegionsMissingNoAccess() +
+ stats.getReliableRegionsMissingLimitedAccess() + stats.getReliableRegionsMissingFullAccess()));
+
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
index 78179cf,4e01601..f434df4
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheSerializableRunnable.java
@@@ -28,9 -30,13 +28,14 @@@ import com.gemstone.gemfire.test.dunit.
* CacheException}. This way, we don't need to have a lot of
* try/catch code in the tests.
*
++<<<<<<< HEAD
+ * @since 3.0
++=======
+ *
+ * @since GemFire 3.0
++>>>>>>> origin/develop
*/
-public abstract class CacheSerializableRunnable
- extends SerializableRunnable
- implements RepeatableRunnable
-{
+public abstract class CacheSerializableRunnable extends SerializableRunnable implements RepeatableRunnable {
/**
* Creates a new <code>CacheSerializableRunnable</code> with the
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
index 3b57fde,8fd89ef..5621a3f
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheStatisticsDUnitTest.java
@@@ -43,13 -34,12 +43,13 @@@ import com.gemstone.gemfire.test.dunit.
* Region} and a {@link com.gemstone.gemfire.cache.Region.Entry}.
*
*
- * @since 3.0
+ * @since GemFire 3.0
*/
-public class CacheStatisticsDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class CacheStatisticsDUnitTest extends JUnit4CacheTestCase {
- public CacheStatisticsDUnitTest(String name) {
- super(name);
+ public CacheStatisticsDUnitTest() {
+ super();
}
//////// Helper Methods
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheWriterTestCase.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java
index 9961746,bc50219..010b1f9
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java
@@@ -63,7 -37,7 +63,7 @@@ import com.gemstone.gemfire.util.test.T
* Tests the functionality of loading a declarative caching file when
* a <code>Cache</code> is {@link CacheFactory#create created}. The
* fact that it is a subclass of {@link RegionTestCase} allows us to
-- * take advantage of methods like {@link #getCache}.
++ * take advantage of methods like getCache().
*
* <P>
*
@@@ -71,11 -45,14 +71,11 @@@
* 3.X (3.0, 3.2, 3.5). Tests for syntax added in subsequent releases
* is tested by subclasses of this class.
*
- * @since 3.0
+ * @since GemFire 3.0
*/
+@Category(DistributedTest.class)
public class CacheXml30DUnitTest extends CacheXmlTestCase {
- public CacheXml30DUnitTest(String name) {
- super(name);
- }
-
/**
* Tests creating a cache with a non-existent XML file
*/
@@@ -590,9 -543,8 +590,9 @@@
* Tests to make sure that the example cache.xml file in the API
* documentation conforms to the DTD.
*
- * @since 3.2.1
+ * @since GemFire 3.2.1
*/
+ @Test
public void testExampleCacheXmlFile() throws Exception {
// Check for old example files
String dirName = "examples_" + this.getGemFireVersion();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java
index 9b3ea63,134cf5f..279b563
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml40DUnitTest.java
@@@ -16,15 -16,6 +16,11 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
+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 org.junit.Test;
++import org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.MirrorType;
import com.gemstone.gemfire.cache.Scope;
@@@ -33,16 -24,23 +29,17 @@@ import com.gemstone.gemfire.internal.ca
import com.gemstone.gemfire.internal.cache.xmlcache.CacheTransactionManagerCreation;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Tests the declarative caching functionality introduced in GemFire
* 4.0.
*
- * @since 4.0
+ * @since GemFire 4.0
*/
+@Category(DistributedTest.class)
public class CacheXml40DUnitTest extends CacheXml30DUnitTest {
- //////// Constructors
-
- public CacheXml40DUnitTest(String name) {
- super(name);
- }
-
- //////// Helper methods
-
protected String getGemFireVersion() {
return CacheXml.VERSION_4_0;
}
@@@ -50,9 -48,10 +47,9 @@@
/**
* Tests the cache server attribute
*
- * @since 4.0
+ * @since GemFire 4.0
*/
+ @Test
public void testServer() {
CacheCreation cache = new CacheCreation();
cache.setIsServer(true);
@@@ -64,9 -63,8 +61,9 @@@
/**
* Tests declarative bridge servers
*
- * @since 4.0
+ * @since GemFire 4.0
*/
+ @Test
public void testBridgeServers() {
CacheCreation cache = new CacheCreation();
@@@ -111,9 -108,8 +108,9 @@@
/**
* Tests a cache listener with no parameters
*
- * @since 4.0
+ * @since GemFire 4.0
*/
+ @Test
public void testTransactionListener() {
CacheCreation cache = new CacheCreation();
CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation();
@@@ -125,9 -121,8 +122,9 @@@
/**
* Tests transaction manager with no listener
*
- * @since 4.0
+ * @since GemFire 4.0
*/
+ @Test
public void testCacheTransactionManager() {
CacheCreation cache = new CacheCreation();
CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation();
@@@ -139,9 -134,8 +136,9 @@@
* Tests the value constraints region attribute that was added in
* GemFire 4.0.
*
- * @since 4.1
+ * @since GemFire 4.1
*/
+ @Test
public void testConstrainedValues() throws CacheException {
CacheCreation cache = new CacheCreation();
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java
index a95b4c0,617f9ca..9c7d37a
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml41DUnitTest.java
@@@ -16,15 -16,6 +16,8 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
+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.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@@ -32,6 -23,6 +25,8 @@@ import java.io.InputStream
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
import org.xml.sax.SAXException;
import com.gemstone.gemfire.cache.Cache;
@@@ -53,14 -44,13 +48,15 @@@ import com.gemstone.gemfire.internal.ca
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.IgnoredException;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Tests the declarative caching functionality introduced in GemFire 4.1.
*
- * @since 4.1
+ * @since GemFire 4.1
*/
+@Category(DistributedTest.class)
public class CacheXml41DUnitTest extends CacheXml40DUnitTest
{
@@@ -551,10 -532,9 +547,10 @@@
//}
/**
* Test Publisher region attribute
- * @since 4.2.3
+ * @since GemFire 4.2.3
* @deprecated as of GemFire 6.5.
*/
+ @Test
public void testPublisherAttribute() throws CacheException {
// CacheCreation cache = new CacheCreation();
@@@ -567,9 -547,8 +563,9 @@@
/**
* Test EnableBridgeConflation region attribute
- * @since 4.2
+ * @since GemFire 4.2
*/
+ @Test
public void testEnableBridgeConflationAttribute() throws CacheException {
CacheCreation cache = new CacheCreation();
@@@ -582,9 -561,8 +578,9 @@@
/**
* Test EnableAsyncConflation region attribute
- * @since 4.2
+ * @since GemFire 4.2
*/
+ @Test
public void testEnableAsyncConflationAttribute() throws CacheException {
CacheCreation cache = new CacheCreation();
@@@ -595,9 -573,8 +591,9 @@@
assertEquals(true, cache.getRegion("root").getAttributes().getEnableAsyncConflation());
}
/**
- * @since 4.3
+ * @since GemFire 4.3
*/
+ @Test
public void testDynamicRegionFactoryDefault() throws CacheException {
CacheCreation cache = new CacheCreation();
cache.setDynamicRegionFactoryConfig(new DynamicRegionFactory.Config());
@@@ -637,9 -613,8 +633,9 @@@
}
/**
- * @since 4.3
+ * @since GemFire 4.3
*/
+ @Test
public void testDynamicRegionFactoryDiskDir() throws CacheException {
CacheCreation cache = new CacheCreation();
File f = new File("diskDir");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
index f7ebd90,a6705ee..1662dfe
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
@@@ -16,39 -16,8 +16,40 @@@
*/
package com.gemstone.gemfire.cache30;
++import static com.gemstone.gemfire.distributed.DistributedSystemConfigProperties.*;
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
import com.company.app.DBLoader;
-import com.gemstone.gemfire.cache.*;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.AttributesMutator;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache.CacheListener;
+import com.gemstone.gemfire.cache.CacheTransactionManager;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Declarable;
+import com.gemstone.gemfire.cache.EvictionAction;
+import com.gemstone.gemfire.cache.EvictionAttributes;
+import com.gemstone.gemfire.cache.InterestPolicy;
+import com.gemstone.gemfire.cache.LossAction;
+import com.gemstone.gemfire.cache.MembershipAttributes;
+import com.gemstone.gemfire.cache.MirrorType;
+import com.gemstone.gemfire.cache.PartitionAttributes;
+import com.gemstone.gemfire.cache.PartitionAttributesFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.ResumptionAction;
+import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.TransactionListener;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
@@@ -63,11 -38,18 +64,11 @@@ import com.gemstone.gemfire.test.junit.
* Tests the declarative caching functionality introduced in GemFire
* 5.0 (i.e. congo1). Don't be confused by the 45 in my name :-)
*
- * @since 5.0
+ * @since GemFire 5.0
*/
+@Category(DistributedTest.class)
public class CacheXml45DUnitTest extends CacheXml41DUnitTest {
- //////// Constructors
-
- public CacheXml45DUnitTest(String name) {
- super(name);
- }
-
- //////// Helper methods
-
protected String getGemFireVersion() {
return CacheXml.VERSION_5_0;
}
@@@ -198,9 -182,8 +199,9 @@@
/**
* Tests multiple cache listeners on one region
- * @since 5.0
+ * @since GemFire 5.0
*/
+ @Test
public void testMultipleCacheListener() throws CacheException {
CacheCreation cache = new CacheCreation();
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
@@@ -270,9 -252,8 +271,9 @@@
/**
* Tests multiple transaction listeners
- * @since 5.0
+ * @since GemFire 5.0
*/
+ @Test
public void testMultipleTXListener() throws CacheException {
CacheCreation cache = new CacheCreation();
CacheTransactionManagerCreation txMgrCreation = new CacheTransactionManagerCreation();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml51DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml51DUnitTest.java
index d172c75,47f3825..ea258dd
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml51DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml51DUnitTest.java
@@@ -16,33 -16,23 +16,40 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
-import com.gemstone.gemfire.cache.*;
+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 org.junit.Test;
++import org.junit.experimental.categories.Category;
+
- import com.gemstone.gemfire.cache.*;
++import com.gemstone.gemfire.cache.Cache;
++import com.gemstone.gemfire.cache.CacheException;
++import com.gemstone.gemfire.cache.DataPolicy;
++import com.gemstone.gemfire.cache.DiskWriteAttributesFactory;
++import com.gemstone.gemfire.cache.PartitionAttributes;
++import com.gemstone.gemfire.cache.PartitionAttributesFactory;
++import com.gemstone.gemfire.cache.Region;
++import com.gemstone.gemfire.cache.RegionAttributes;
++import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
--import com.gemstone.gemfire.internal.cache.DiskWriteAttributesImpl;
--import com.gemstone.gemfire.internal.cache.xmlcache.*;
++import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
++import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
++import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
++import com.gemstone.gemfire.internal.cache.xmlcache.RegionCreation;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Tests the declarative caching functionality introduced in the GemFire
* 5.0 (i.e. congo1). Don't be confused by the 45 in my name :-)
*
- * @since 5.0
+ * @since GemFire 5.0
*/
+@Category(DistributedTest.class)
public class CacheXml51DUnitTest extends CacheXml45DUnitTest
{
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml55DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml55DUnitTest.java
index da4644a,315567f..d6387d6
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml55DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml55DUnitTest.java
@@@ -16,26 -16,16 +16,21 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
+import org.junit.Test;
-
- 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 org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Tests the declarative caching functionality introduced in the GemFire
* 5.0 (i.e. congo1). Don't be confused by the 45 in my name :-)
*
- * @since 5.0
+ * @since GemFire 5.0
*/
+@Category(DistributedTest.class)
public class CacheXml55DUnitTest extends CacheXml51DUnitTest
{
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java
index 8a31e35,2cb61f8..84a25cb
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml57DUnitTest.java
@@@ -68,11 -64,12 +68,11 @@@ import com.gemstone.gemfire.test.junit.
/**
* Tests 5.7 cache.xml features.
*
- * @since 5.7
+ * @since GemFire 5.7
*/
+@Category(DistributedTest.class)
+public class CacheXml57DUnitTest extends CacheXml55DUnitTest {
-public class CacheXml57DUnitTest extends CacheXml55DUnitTest
-{
- //
private final static String ALIAS1;
private final static String ALIAS2;
@@@ -404,9 -405,8 +404,9 @@@
* client subscription config in gemfire cache-server framework
*
* @throws CacheException
- * @since 5.7
+ * @since GemFire 5.7
*/
+ @Test
public void testBridgeAttributesRelatedToHAOverFlow() throws CacheException {
CacheCreation cache = new CacheCreation();
cache.setMessageSyncInterval(3445);
@@@ -647,9 -643,8 +647,9 @@@
/**
* Test EnableSubscriptionConflation region attribute
- * @since 5.7
+ * @since GemFire 5.7
*/
+ @Test
public void testEnableSubscriptionConflationAttribute() throws CacheException {
CacheCreation cache = new CacheCreation();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java
index 9906942,f61158f..aaf3251
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml58DUnitTest.java
@@@ -16,22 -16,13 +16,17 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
+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.Map;
import java.util.Properties;
--import com.gemstone.gemfire.cache.Cache;
--import com.gemstone.gemfire.cache.CacheException;
++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.CacheException;
import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.DiskWriteAttributesFactory;
import com.gemstone.gemfire.cache.EvictionAction;
@@@ -45,23 -36,22 +40,22 @@@ import com.gemstone.gemfire.cache.Regio
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionService;
--import com.gemstone.gemfire.cache.util.ObjectSizerImpl;
--import com.gemstone.gemfire.internal.cache.DistributedRegion;
--import com.gemstone.gemfire.internal.cache.functions.*;
++import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.internal.cache.lru.MemLRUCapacityController;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
import com.gemstone.gemfire.internal.cache.xmlcache.FunctionServiceCreation;
import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
import com.gemstone.gemfire.internal.cache.xmlcache.ResourceManagerCreation;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Tests 5.8 cache.xml features.
*
- * @since 5.8
+ * @since GemFire 5.8
*/
+@Category(DistributedTest.class)
public class CacheXml58DUnitTest extends CacheXml57DUnitTest
{
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml60DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml60DUnitTest.java
index 2c72a75,992956a..bd30e07
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml60DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml60DUnitTest.java
@@@ -16,20 -16,11 +16,16 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
+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.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.io.Serializable;
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.Cache;
@@@ -47,14 -38,13 +43,15 @@@ import com.gemstone.gemfire.internal.ca
import com.gemstone.gemfire.internal.cache.xmlcache.SerializerCreation;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.test.dunit.IgnoredException;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Tests 6.0 cache.xml features.
*
- * @since 6.0
+ * @since GemFire 6.0
*/
+@Category(DistributedTest.class)
public class CacheXml60DUnitTest extends CacheXml58DUnitTest
{
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml61DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml61DUnitTest.java
index 115459c,5bbdc59..424cc01
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml61DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml61DUnitTest.java
@@@ -34,11 -53,19 +34,11 @@@ import com.gemstone.gemfire.test.junit.
/**
* Tests 6.1 cache.xml features.
*
- * @since 6.1
+ * @since GemFire 6.1
*/
-
+@Category(DistributedTest.class)
public class CacheXml61DUnitTest extends CacheXml60DUnitTest {
- // ////// Constructors
-
- public CacheXml61DUnitTest(String name) {
- super(name);
- }
-
- // ////// Helper methods
-
protected String getGemFireVersion()
{
return CacheXml.VERSION_6_1;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java
index a332187,7ad424a..a957796
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml65DUnitTest.java
@@@ -20,15 -20,6 +20,8 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
+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.io.File;
import java.io.IOException;
import java.net.InetAddress;
@@@ -36,6 -27,6 +29,9 @@@ import java.net.InetSocketAddress
import java.net.UnknownHostException;
import java.util.Arrays;
++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.CacheException;
@@@ -71,13 -62,12 +67,14 @@@ import com.gemstone.gemfire.internal.ca
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.IgnoredException;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Tests 6.5 cache.xml features.
*
- * @since 6.5
+ * @since GemFire 6.5
*/
+@Category(DistributedTest.class)
public class CacheXml65DUnitTest extends CacheXml61DUnitTest {
private final static String ALIAS1;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bd38e10f/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml66DUnitTest.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml66DUnitTest.java
index 965a064,8600214..6e4271d
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml66DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml66DUnitTest.java
@@@ -16,19 -16,10 +16,15 @@@
*/
package com.gemstone.gemfire.cache30;
- import org.junit.experimental.categories.Category;
- import org.junit.Test;
-
+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.ArrayList;
import java.util.List;
import java.util.Properties;
++import org.junit.Test;
++import org.junit.experimental.categories.Category;
++
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
@@@ -52,13 -43,12 +48,14 @@@ import com.gemstone.gemfire.internal.ca
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.IgnoredException;
++import com.gemstone.gemfire.test.junit.categories.DistributedTest;
/**
* Tests 7.0 cache.xml feature : Fixed Partitioning.
*
- * @since 6.6
+ * @since GemFire 6.6
*/
+@Category(DistributedTest.class)
public class CacheXml66DUnitTest extends CacheXml65DUnitTest{
//////// Constructors