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/05/24 00:31:43 UTC
[18/29] incubator-geode git commit: Converting dunits to junit 4
using dunits_to_junit4.sh
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java
index 638a55b..5c92f53 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupDUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
@@ -68,14 +77,15 @@ import com.gemstone.gemfire.test.dunit.VM;
/**
*
*/
+@Category(DistributedTest.class)
public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
private static final long MAX_WAIT = 30 * 1000;
- public BackupDUnitTest(String name) {
- super(name);
+ public BackupDUnitTest() {
+ super();
}
@Override
@@ -87,6 +97,7 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
}
}
+ @Test
public void testBackupPR() throws Throwable {
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
@@ -155,6 +166,7 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
* Test of bug 42419
* @throws Throwable
*/
+ @Test
public void testBackupFromMemberWithDiskStore() throws Throwable {
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
@@ -218,6 +230,7 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
* Test for bug 42419
* @throws Throwable
*/
+ @Test
public void testBackupWhileBucketIsCreated() throws Throwable {
Host host = Host.getHost(0);
final VM vm0 = host.getVM(0);
@@ -295,6 +308,7 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
checkData(vm0, 0, 1, "A", "region1");
}
+ @Test
public void testBackupWhileBucketIsMovedBackupBeforeSendDestroy() throws Throwable {
Host host = Host.getHost(0);
final VM vm2 = host.getVM(2);
@@ -319,6 +333,7 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
backupWhileBucketIsMoved(observer);
}
+ @Test
public void testBackupWhileBucketIsMovedBackupAfterSendDestroy() throws Throwable {
Host host = Host.getHost(0);
final VM vm0 = host.getVM(0);
@@ -358,6 +373,7 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
backupWhileBucketIsMoved(observer);
}
+ @Test
public void testBackupStatusCleanedUpAfterFailureOnOneMember() throws Throwable {
IgnoredException.addIgnoredException("Uncaught exception");
IgnoredException.addIgnoredException("Stop processing");
@@ -511,6 +527,7 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
* data as backed up.
* @throws Throwable
*/
+ @Test
public void testBackupOverflow() throws Throwable {
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
@@ -535,6 +552,7 @@ public class BackupDUnitTest extends PersistentPartitionedRegionTestBase {
}
+ @Test
public void testBackupPRWithOfflineMembers() throws Throwable {
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33359DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33359DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33359DUnitTest.java
index 4c31a38..e2856a3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33359DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33359DUnitTest.java
@@ -21,6 +21,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.Properties;
import com.gemstone.gemfire.cache.AttributesFactory;
@@ -42,11 +51,12 @@ import com.gemstone.gemfire.test.dunit.VM;
/**
*
*/
-public class Bug33359DUnitTest extends DistributedTestCase {
+@Category(DistributedTest.class)
+public class Bug33359DUnitTest extends JUnit4DistributedTestCase {
/** Creates a new instance of Bug33359DUnitTest */
- public Bug33359DUnitTest(String name) {
- super(name);
+ public Bug33359DUnitTest() {
+ super();
}
static Cache cache;
@@ -80,7 +90,7 @@ public class Bug33359DUnitTest extends DistributedTestCase {
public static void createCacheVM0(){
try{
- ds = (new Bug33359DUnitTest("temp")).getSystem(props);
+ ds = (new Bug33359DUnitTest()).getSystem(props);
cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
@@ -98,7 +108,7 @@ public class Bug33359DUnitTest extends DistributedTestCase {
} //end of create cache for VM0
public static void createCacheVM1(){
try{
- ds = (new Bug33359DUnitTest("temp")).getSystem(props);
+ ds = (new Bug33359DUnitTest()).getSystem(props);
DistributedSystem.setThreadsSocketPolicy(false);
cache = CacheFactory.create(ds);
@@ -128,7 +138,8 @@ public class Bug33359DUnitTest extends DistributedTestCase {
//test methods
- public void testClearMultiVM(){
+ @Test
+ public void testClearMultiVM(){
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726DUnitTest.java
index 16443b3..03c2a16 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.Properties;
import com.gemstone.gemfire.cache.AttributesFactory;
@@ -32,7 +41,8 @@ import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
-public class Bug33726DUnitTest extends DistributedTestCase {
+@Category(DistributedTest.class)
+public class Bug33726DUnitTest extends JUnit4DistributedTestCase {
static boolean[] flags = new boolean[2];
static Cache cache = null;
@@ -40,8 +50,8 @@ public class Bug33726DUnitTest extends DistributedTestCase {
static boolean isOK = false;
- public Bug33726DUnitTest(String name){
- super(name);
+ public Bug33726DUnitTest(){
+ super();
}
@Override
@@ -63,6 +73,7 @@ public class Bug33726DUnitTest extends DistributedTestCase {
}
}
+ @Test
public void testAfterRegionCreate() {
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
@@ -76,7 +87,7 @@ public class Bug33726DUnitTest extends DistributedTestCase {
public static void createCacheAndPopulateRegion1() {
try {
- ds = (new Bug33726DUnitTest("temp")).getSystem(new Properties());
+ ds = (new Bug33726DUnitTest()).getSystem(new Properties());
cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.GLOBAL);
@@ -97,7 +108,7 @@ public class Bug33726DUnitTest extends DistributedTestCase {
public static void createCacheAndRegion2() {
try {
- ds = (new Bug33726DUnitTest("temp")).getSystem(new Properties());
+ ds = (new Bug33726DUnitTest()).getSystem(new Properties());
cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
factory.setCacheListener(new TestCacheListener());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37241DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37241DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37241DUnitTest.java
index 1b4ca3b..75130a3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37241DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37241DUnitTest.java
@@ -17,6 +17,15 @@
package com.gemstone.gemfire.internal.cache;
+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.util.*;
@@ -39,7 +48,8 @@ import com.gemstone.gemfire.test.dunit.VM;
* CleanupFailedInitialization on should also clean disk files created
*/
-public class Bug37241DUnitTest extends DistributedTestCase
+@Category(DistributedTest.class)
+public class Bug37241DUnitTest extends JUnit4DistributedTestCase
{
private static Cache cache = null;
@@ -54,8 +64,8 @@ public class Bug37241DUnitTest extends DistributedTestCase
static final String expectedException = IllegalStateException.class.getName();
/* Constructor */
- public Bug37241DUnitTest(String name) {
- super(name);
+ public Bug37241DUnitTest() {
+ super();
}
@Override
@@ -71,6 +81,7 @@ public class Bug37241DUnitTest extends DistributedTestCase
* 3.Region creation should fail . Check for all files created in the directory for server 2
* gets deleted.
*/
+ @Test
public void testBug37241ForNewDiskRegion()
{
server1.invoke(() -> Bug37241DUnitTest.createRegionOnServer1());
@@ -84,6 +95,7 @@ public class Bug37241DUnitTest extends DistributedTestCase
}
}
+ @Test
public void testBug37241ForRecreatedDiskRegion()
{
server1.invoke(() -> Bug37241DUnitTest.createRegionOnServer1());
@@ -110,7 +122,7 @@ public class Bug37241DUnitTest extends DistributedTestCase
public static void createRegionOnServer1() throws Exception
{
- new Bug37241DUnitTest("temp").createCache(new Properties());
+ new Bug37241DUnitTest().createCache(new Properties());
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.GLOBAL);
factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
@@ -133,7 +145,7 @@ public class Bug37241DUnitTest extends DistributedTestCase
public static void createRegionOnServer2(Scope scope) throws Exception
{
- new Bug37241DUnitTest("temp").createCache(new Properties());
+ new Bug37241DUnitTest().createCache(new Properties());
AttributesFactory factory = new AttributesFactory();
factory.setScope(scope);
factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37377DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37377DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37377DUnitTest.java
index f5c1d81..1ffd9c8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37377DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37377DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.util.Properties;
@@ -48,7 +57,8 @@ import com.gemstone.gemfire.test.dunit.Wait;
*
*/
-public class Bug37377DUnitTest extends CacheTestCase
+@Category(DistributedTest.class)
+public class Bug37377DUnitTest extends JUnit4CacheTestCase
{
protected static String regionName = "TestRegion";
@@ -72,8 +82,8 @@ public class Bug37377DUnitTest extends CacheTestCase
*
* @param name
*/
- public Bug37377DUnitTest(String name) {
- super(name);
+ public Bug37377DUnitTest() {
+ super();
File file1 = new File(name + "1");
file1.mkdir();
file1.deleteOnExit();
@@ -112,7 +122,7 @@ public class Bug37377DUnitTest extends CacheTestCase
{
try {
- distributedSystem = (new Bug37377DUnitTest("vm0_diskReg"))
+ distributedSystem = (new Bug37377DUnitTest())
.getSystem(props);
assertTrue(distributedSystem != null);
cache = CacheFactory.create(distributedSystem);
@@ -149,7 +159,7 @@ public class Bug37377DUnitTest extends CacheTestCase
public void run2()
{
try {
- distributedSystem = (new Bug37377DUnitTest("vm1_diskReg"))
+ distributedSystem = (new Bug37377DUnitTest())
.getSystem(props);
assertTrue(distributedSystem != null);
cache = CacheFactory.create(distributedSystem);
@@ -303,6 +313,7 @@ public class Bug37377DUnitTest extends CacheTestCase
*
*/
+ @Test
public void testGIIputWithClear()
{
vm0.invoke(createCacheForVM0());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java
index 74f31cd..31e98fb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java
@@ -19,6 +19,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.nio.channels.FileChannel;
@@ -54,7 +63,8 @@ import com.gemstone.gemfire.test.dunit.VM;
* also not try to recover from the disk
*
*/
-public class Bug39079DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug39079DUnitTest extends JUnit4CacheTestCase {
protected static String regionName = "IGNORE_EXCEPTION_Bug39079";
@@ -80,8 +90,8 @@ public class Bug39079DUnitTest extends CacheTestCase {
*
* @param name
*/
- public Bug39079DUnitTest(String name) {
- super(name);
+ public Bug39079DUnitTest() {
+ super();
File file1 = new File(name + "1");
file1.mkdir();
file1.deleteOnExit();
@@ -115,7 +125,7 @@ public class Bug39079DUnitTest extends CacheTestCase {
public void run2() {
try {
- (new Bug39079DUnitTest("vm0_diskReg"))
+ (new Bug39079DUnitTest())
.getSystem();
assertTrue(getCache() != null);
@@ -149,7 +159,7 @@ public class Bug39079DUnitTest extends CacheTestCase {
"createCache") {
public void run2() {
try {
- (new Bug39079DUnitTest("vm1_diskReg"))
+ (new Bug39079DUnitTest())
.getSystem();
@@ -195,6 +205,7 @@ public class Bug39079DUnitTest extends CacheTestCase {
*
*/
+ @Test
public void testGIIDiskAccessException() {
vm0.invoke(createCacheForVM0());
@@ -298,6 +309,7 @@ public class Bug39079DUnitTest extends CacheTestCase {
*
* @throws Exception
*/
+ @Test
public void testBridgeServerStoppingInSynchPersistOnlyForIOExceptionCase()
throws Exception {
// create server cache
@@ -316,7 +328,7 @@ public class Bug39079DUnitTest extends CacheTestCase {
public static Integer createServerCache() throws Exception
{
- new Bug39079DUnitTest("temp").createCache(new Properties());
+ new Bug39079DUnitTest().createCache(new Properties());
DiskRegionProperties props = new DiskRegionProperties();
props.setRegionName(REGION_NAME);
props.setOverflow(true);
@@ -385,11 +397,11 @@ public class Bug39079DUnitTest extends CacheTestCase {
public static void createClientCache(String host, Integer port1)
throws Exception {
- new Bug39079DUnitTest("temp");
+ new Bug39079DUnitTest();
Properties props = new Properties();
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
props.setProperty(DistributionConfig.LOCATORS_NAME, "");
- new Bug39079DUnitTest("temp").createCache(props);
+ new Bug39079DUnitTest().createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory().addServer(host,
port1.intValue())
.setSubscriptionEnabled(true).setSubscriptionRedundancy(0)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40299DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40299DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40299DUnitTest.java
index ccf2311..baba294 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40299DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40299DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.util.Properties;
@@ -53,7 +62,8 @@ import com.gemstone.gemfire.test.dunit.VM;
*
*/
-public class Bug40299DUnitTest extends CacheTestCase
+@Category(DistributedTest.class)
+public class Bug40299DUnitTest extends JUnit4CacheTestCase
{
protected static String regionName = "TestRegion";
@@ -72,8 +82,8 @@ public class Bug40299DUnitTest extends CacheTestCase
*
* @param name
*/
- public Bug40299DUnitTest(String name) {
- super(name);
+ public Bug40299DUnitTest() {
+ super();
}
@Override
@@ -101,7 +111,7 @@ public class Bug40299DUnitTest extends CacheTestCase
{
try {
- distributedSystem = (new Bug40299DUnitTest("vm0_diskReg"))
+ distributedSystem = (new Bug40299DUnitTest())
.getSystem(props);
assertTrue(distributedSystem != null);
cache = CacheFactory.create(distributedSystem);
@@ -286,6 +296,7 @@ public class Bug40299DUnitTest extends CacheTestCase
* The Test verifies that fix prevents this.
*/
+ @Test
public void testQueryGetWithClear()
{
IgnoredException.addIgnoredException("Entry has been cleared and is not present on disk");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40632DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40632DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40632DUnitTest.java
index 80d5ce4..4305a90 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40632DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug40632DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.Collections;
import java.util.Set;
import java.util.concurrent.CancellationException;
@@ -60,15 +69,17 @@ import com.gemstone.gemfire.test.dunit.VM;
/**
*
*/
-public class Bug40632DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug40632DUnitTest extends JUnit4CacheTestCase {
/**
* @param name
*/
- public Bug40632DUnitTest(String name) {
- super(name);
+ public Bug40632DUnitTest() {
+ super();
}
+ @Test
public void testLocalDestroyIdleTimeout() {
Cache cache = getCache();
AttributesFactory attr = new AttributesFactory();
@@ -88,6 +99,7 @@ public class Bug40632DUnitTest extends CacheTestCase {
}
}
+ @Test
public void testLocalDestroyTimeToLive() {
Cache cache = getCache();
AttributesFactory attr = new AttributesFactory();
@@ -107,6 +119,7 @@ public class Bug40632DUnitTest extends CacheTestCase {
}
}
+ @Test
public void testLocalInvalidateIdleTimeout() {
Cache cache = getCache();
AttributesFactory attr = new AttributesFactory();
@@ -126,6 +139,7 @@ public class Bug40632DUnitTest extends CacheTestCase {
}
}
+ @Test
public void testLocalInvalidateTimeToLive() {
Cache cache = getCache();
AttributesFactory attr = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
index 0e11829..c5db436 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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;
@@ -47,13 +56,14 @@ import com.gemstone.gemfire.test.dunit.VM;
* a failure of the GII target during GII.
*
*/
-public class Bug41091DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug41091DUnitTest extends JUnit4CacheTestCase {
/**
* @param name
*/
- public Bug41091DUnitTest(String name) {
- super(name);
+ public Bug41091DUnitTest() {
+ super();
}
@Override
@@ -61,6 +71,7 @@ public class Bug41091DUnitTest extends CacheTestCase {
disconnectAllFromDS();
}
+ @Test
public void test() {
final Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41733DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41733DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41733DUnitTest.java
index 2607711..3f0e2a0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41733DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41733DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.Collections;
import java.util.Set;
import java.util.TreeSet;
@@ -47,11 +56,12 @@ import com.gemstone.gemfire.test.dunit.VM;
* Test to make sure that we can handle
* a crash of the member directing bucket creation.
*/
-public class Bug41733DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug41733DUnitTest extends JUnit4CacheTestCase {
- public Bug41733DUnitTest(String name) {
- super(name);
+ public Bug41733DUnitTest() {
+ super();
}
@@ -67,6 +77,7 @@ public class Bug41733DUnitTest extends CacheTestCase {
* Test the we can handle a member departing after creating
* a bucket on the remote node but before we choose a primary
*/
+ @Test
public void testCrashAfterBucketCreation() throws Throwable {
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
@@ -117,6 +128,7 @@ public class Bug41733DUnitTest extends CacheTestCase {
* Test the we can handle a member departing while we are
* in the process of creating the bucket on the remote node.
*/
+ @Test
public void testCrashDuringBucketCreation() throws Throwable {
Host host = Host.getHost(0);
final VM vm0 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug42055DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug42055DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug42055DUnitTest.java
index c68c5eb..43164d9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug42055DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug42055DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DataPolicy;
@@ -35,16 +44,18 @@ import com.gemstone.gemfire.test.dunit.VM;
* we fault out and in a delta object.
*
*/
-public class Bug42055DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug42055DUnitTest extends JUnit4CacheTestCase {
/**
* @param name
*/
- public Bug42055DUnitTest(String name) {
- super(name);
+ public Bug42055DUnitTest() {
+ super();
}
+ @Test
public void testPROverflow() throws Exception {
final Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45164DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45164DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45164DUnitTest.java
index 7a6ff90..9cb0eb9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45164DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45164DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.Entry;
import com.gemstone.gemfire.cache.Cache;
@@ -28,14 +37,16 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-public class Bug45164DUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class Bug45164DUnitTest extends JUnit4CacheTestCase {
private static final int count = 10000;
private static final int stride = 3;
- public Bug45164DUnitTest(String name) {
- super(name);
+ public Bug45164DUnitTest() {
+ super();
}
+ @Test
public void testIterateWhileDestroy() throws Throwable {
SerializableRunnable destroy = new SerializableRunnable() {
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
index ca1c1b1..8188cad 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.HashMap;
import java.util.Map;
@@ -32,11 +41,13 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
-public class Bug45934DUnitTest extends CacheTestCase {
- public Bug45934DUnitTest(String name) {
- super(name);
+@Category(DistributedTest.class)
+public class Bug45934DUnitTest extends JUnit4CacheTestCase {
+ public Bug45934DUnitTest() {
+ super();
}
+ @Test
public void testNormal() throws Exception {
int count = 1000;
Host host = Host.getHost(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug47667DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug47667DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug47667DUnitTest.java
index d3b3963..4575670 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug47667DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug47667DUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.CacheTransactionManager;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.client.ClientCache;
@@ -28,12 +37,13 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.NetworkUtils;
import com.gemstone.gemfire.test.dunit.VM;
+@Category(DistributedTest.class)
public class Bug47667DUnitTest extends LocatorTestBase {
private static final long serialVersionUID = 2859534245283086765L;
- public Bug47667DUnitTest(String name) {
- super(name);
+ public Bug47667DUnitTest() {
+ super();
}
@Override
@@ -46,6 +56,7 @@ public class Bug47667DUnitTest extends LocatorTestBase {
disconnectAllFromDS();
}
+ @Test
public void testbug47667() {
Host host = Host.getHost(0);
VM locator = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheAdvisorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheAdvisorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheAdvisorDUnitTest.java
index 1706a5b..96c4c39 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheAdvisorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheAdvisorDUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.Arrays;
import java.util.HashSet;
@@ -48,13 +57,14 @@ import com.gemstone.gemfire.test.dunit.VM;
*
*
*/
-public class CacheAdvisorDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class CacheAdvisorDUnitTest extends JUnit4CacheTestCase {
private transient VM[] vms;
private transient InternalDistributedMember[] ids;
/** Creates a new instance of CacheAdvisorDUnitTest */
- public CacheAdvisorDUnitTest(String name) {
- super(name);
+ public CacheAdvisorDUnitTest() {
+ super();
}
/**
@@ -82,6 +92,7 @@ public class CacheAdvisorDUnitTest extends CacheTestCase {
this.ids = (InternalDistributedMember[])idList.toArray(new InternalDistributedMember[idList.size()]);
}
+ @Test
public void testGenericAdvice() throws Exception {
final RegionAttributes attrs = new AttributesFactory().create();
assertTrue(attrs.getScope().isDistributedNoAck());
@@ -108,6 +119,7 @@ public class CacheAdvisorDUnitTest extends CacheTestCase {
assertEquals("Unexpected advice for subregion=" + rgn, expected, actual);
}
+ @Test
public void testNetWriteAdvice() throws Exception {
final String rgnName = getUniqueName();
Set expected = new HashSet();
@@ -134,6 +146,7 @@ public class CacheAdvisorDUnitTest extends CacheTestCase {
assertEquals(expected, rgn.getCacheDistributionAdvisor().adviseNetWrite());
}
+ @Test
public void testNetLoadAdvice() throws Exception {
final String rgnName = getUniqueName();
Set expected = new HashSet();
@@ -166,6 +179,7 @@ public class CacheAdvisorDUnitTest extends CacheTestCase {
assertEquals(expected, rgn.getCacheDistributionAdvisor().adviseNetLoad());
}
+ @Test
public void testNetLoadAdviceWithAttributesMutator() throws Exception {
final String rgnName = getUniqueName();
@@ -263,17 +277,20 @@ public class CacheAdvisorDUnitTest extends CacheTestCase {
/** coverage for bug 34255
* @since 5.0
*/
- public void testRegionClose() throws Exception {
+ @Test
+ public void testRegionClose() throws Exception {
basicTestClose(Operation.REGION_CLOSE);
}
/** coverage for bug 34255
* @since 5.0
*/
+ @Test
public void testRegionLocalDestroy() throws Exception {
basicTestClose(Operation.REGION_LOCAL_DESTROY);
}
+ @Test
public void testCacheClose() throws Exception {
basicTestClose(Operation.CACHE_CLOSE);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java
index 95a4969..df9d070 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java
@@ -21,6 +21,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.Properties;
import com.gemstone.gemfire.cache.AttributesFactory;
@@ -46,11 +55,12 @@ import com.gemstone.gemfire.test.dunit.VM;
/**
*
*/
-public class ClearDAckDUnitTest extends DistributedTestCase {
+@Category(DistributedTest.class)
+public class ClearDAckDUnitTest extends JUnit4DistributedTestCase {
/** Creates a new instance of ClearDAckDUnitTest */
- public ClearDAckDUnitTest(String name) {
- super(name);
+ public ClearDAckDUnitTest() {
+ super();
}
static Cache cache;
@@ -104,7 +114,7 @@ public class ClearDAckDUnitTest extends DistributedTestCase {
// props.setProperty("mcast-port", "1234");
// ds = DistributedSystem.connect(props);
LogWriterUtils.getLogWriter().info("I am vm0");
- ds = (new ClearDAckDUnitTest("temp")).getSystem(props);
+ ds = (new ClearDAckDUnitTest()).getSystem(props);
cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
@@ -129,7 +139,7 @@ public class ClearDAckDUnitTest extends DistributedTestCase {
// props.setProperty("mcast-port", "1234");
// ds = DistributedSystem.connect(props);
LogWriterUtils.getLogWriter().info("I am vm1");
- ds = (new ClearDAckDUnitTest("temp")).getSystem(props);
+ ds = (new ClearDAckDUnitTest()).getSystem(props);
//DistributedSystem.setThreadsSocketPolicy(false);
CacheObserverImpl observer = new CacheObserverImpl();
origObserver = CacheObserverHolder.setInstance(observer);
@@ -158,7 +168,7 @@ public class ClearDAckDUnitTest extends DistributedTestCase {
// props.setProperty("mcast-port", "1234");
// ds = DistributedSystem.connect(props);
LogWriterUtils.getLogWriter().info("I am vm2");
- ds = (new ClearDAckDUnitTest("temp")).getSystem(props);
+ ds = (new ClearDAckDUnitTest()).getSystem(props);
//DistributedSystem.setThreadsSocketPolicy(false);
CacheObserverImpl observer = new CacheObserverImpl();
origObserver = CacheObserverHolder.setInstance(observer);
@@ -196,7 +206,8 @@ public class ClearDAckDUnitTest extends DistributedTestCase {
//test methods
- public void testClearMultiVM(){
+ @Test
+ public void testClearMultiVM(){
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearGlobalDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearGlobalDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearGlobalDUnitTest.java
index b7795c2..680186b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearGlobalDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearGlobalDUnitTest.java
@@ -22,6 +22,15 @@
package com.gemstone.gemfire.internal.cache;
+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.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -46,12 +55,13 @@ import java.util.Properties;
* operation is completely done
*
*/
-public class ClearGlobalDUnitTest extends DistributedTestCase
+@Category(DistributedTest.class)
+public class ClearGlobalDUnitTest extends JUnit4DistributedTestCase
{
/** Creates a new instance of ClearGlobalDUnitTest */
- public ClearGlobalDUnitTest(String name) {
- super(name);
+ public ClearGlobalDUnitTest() {
+ super();
}
static VM server1 = null;
@@ -106,6 +116,7 @@ public class ClearGlobalDUnitTest extends DistributedTestCase
}
}
+ @Test
public void testClearGlobalMultiVM() throws Exception
{
Object[] objArr = new Object[1];
@@ -120,7 +131,7 @@ public class ClearGlobalDUnitTest extends DistributedTestCase
public static void createCacheServer1() throws Exception
{
- ds = (new ClearGlobalDUnitTest("temp")).getSystem(props);
+ ds = (new ClearGlobalDUnitTest()).getSystem(props);
cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.GLOBAL);
@@ -131,7 +142,7 @@ public class ClearGlobalDUnitTest extends DistributedTestCase
public static void createCacheServer2() throws Exception
{
- ds = (new ClearGlobalDUnitTest("temp")).getSystem(props);
+ ds = (new ClearGlobalDUnitTest()).getSystem(props);
CacheObserverImpl observer = new CacheObserverImpl();
origObserver = CacheObserverHolder.setInstance(observer);
LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER=true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
index 7846723..3c053f3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.IOException;
import java.util.LinkedList;
import java.util.List;
@@ -54,10 +63,11 @@ import com.gemstone.gemfire.test.dunit.VM;
* in its cache if K is invalid on the server.
*
*/
-public class ClientServerInvalidAndDestroyedEntryDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class ClientServerInvalidAndDestroyedEntryDUnitTest extends JUnit4CacheTestCase {
- public ClientServerInvalidAndDestroyedEntryDUnitTest(String name) {
- super(name);
+ public ClientServerInvalidAndDestroyedEntryDUnitTest() {
+ super();
}
@Override
@@ -65,21 +75,25 @@ public class ClientServerInvalidAndDestroyedEntryDUnitTest extends CacheTestCase
disconnectAllFromDS();
}
+ @Test
public void testClientGetsInvalidEntry() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestClientGetsInvalidEntry(regionName, false, false);
}
+ @Test
public void testClientGetsInvalidEntryPR() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestClientGetsInvalidEntry(regionName, true, false);
}
+ @Test
public void testClientGetsTombstone() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestClientGetsTombstone(regionName, false, false);
}
+ @Test
public void testClientGetsTombstonePR() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestClientGetsTombstone(regionName, true, false);
@@ -91,21 +105,25 @@ public class ClientServerInvalidAndDestroyedEntryDUnitTest extends CacheTestCase
+ @Test
public void testClientGetsInvalidEntryTX() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestClientGetsInvalidEntry(regionName, false, true);
}
+ @Test
public void testClientGetsInvalidEntryPRTX() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestClientGetsInvalidEntry(regionName, true, true);
}
+ @Test
public void testClientGetsTombstoneTX() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestClientGetsTombstone(regionName, false, true);
}
+ @Test
public void testClientGetsTombstonePRTX() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestClientGetsTombstone(regionName, true, true);
@@ -114,11 +132,13 @@ public class ClientServerInvalidAndDestroyedEntryDUnitTest extends CacheTestCase
// tests for bug #46780, tombstones left in client after RI
+ @Test
public void testRegisterInterestRemovesOldEntry() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestRegisterInterestRemovesOldEntry(regionName, false);
}
+ @Test
public void testRegisterInterestRemovesOldEntryPR() throws Exception {
final String regionName = getUniqueName()+"Region";
doTestRegisterInterestRemovesOldEntry(regionName, true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionCCEDUnitTest.java
index f9a0ea8..d7b5827 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionCCEDUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -32,6 +41,7 @@ import com.gemstone.gemfire.test.dunit.VM;
/**
* test client initiated transactions with concurrency checks enabled.
*/
+@Category(DistributedTest.class)
public class ClientServerTransactionCCEDUnitTest extends
ClientServerTransactionDUnitTest {
@@ -48,8 +58,8 @@ public class ClientServerTransactionCCEDUnitTest extends
*/
private static final long serialVersionUID = -6785438240204988439L;
- public ClientServerTransactionCCEDUnitTest(String name) {
- super(name);
+ public ClientServerTransactionCCEDUnitTest() {
+ super();
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
index 672c5e6..db85e64 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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 static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
import java.util.ArrayList;
@@ -97,6 +106,7 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
/**
* Tests the basic client-server transaction functionality
*/
+@Category(DistributedTest.class)
public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest {
protected static final int MAX_ENTRIES = 10;
@@ -104,8 +114,8 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
protected static final String OTHER_REGION = "OtherRegion";
- public ClientServerTransactionDUnitTest(String name) {
- super(name);
+ public ClientServerTransactionDUnitTest() {
+ super();
}
@Override
@@ -240,6 +250,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
+ @Test
public void testTwoPoolsNotAllowed() {
Host host = Host.getHost(0);
VM datastore1 = host.getVM(0);
@@ -310,6 +321,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
}
+ @Test
public void testCleanupAfterClientFailure() {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -388,22 +400,27 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
}
}
+ @Test
public void testBasicCommitOnEmpty() {
doBasicTransaction(false, false, true);
}
+ @Test
public void testBasicCommitOnEmptyUsingJTA() {
doBasicTransaction(false, true, true);
}
+ @Test
public void testBasicCommit() {
doBasicTransaction(true, false, true);
}
+ @Test
public void testBasicCommitUsingJTA() {
doBasicTransaction(true, true, true);
}
+ @Test
public void testBasicRollbackUsingJTA() {
doBasicTransaction(true, true, false);
}
@@ -543,10 +560,12 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
verifyVersionTags(client, server, null, null);
}
+ @Test
public void testTXCreationAndCleanupAtCommit() throws Exception {
doBasicChecks(true);
}
+ @Test
public void testTXCreationAndCleanupAtRollback() throws Exception {
doBasicChecks(false);
}
@@ -617,6 +636,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
}
+ @Test
public void testPutallRollbackInServer() throws Exception {
Host host = Host.getHost(0);
VM server = host.getVM(0);
@@ -642,6 +662,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
});
}
+ @Test
public void testPutallRollbackInClient() throws Exception {
Host host = Host.getHost(0);
VM server = host.getVM(0);
@@ -736,7 +757,8 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
});
}
-public void testClientCommitAndDataStoreGetsEvent() throws Exception {
+ @Test
+ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
VM datastore = host.getVM(1);
@@ -787,6 +809,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
+ @Test
public void testClientCreateAndTwoInvalidates() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -831,6 +854,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
+ @Test
public void testClientCommitsAndJustGets() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -870,6 +894,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
}
+ @Test
public void testClientDoesUnsupportedLocalOps() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -923,6 +948,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
}
+ @Test
public void testClientCommitsWithRIAndOnlyGetsOneEvent() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -972,6 +998,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testDatastoreCommitsWithPutAllAndRI() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -1039,6 +1066,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
+ @Test
public void testClientCommitsWithPutAllAndRI() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -1093,6 +1121,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
}
+ @Test
public void testClientRollsbackWithPutAllAndRI() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -1146,6 +1175,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testClientInitiatedInvalidates() throws Exception {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -1320,6 +1350,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
/**
* client connectes to an accessor and completes a transaction
*/
+ @Test
public void testServerDelegate() {
Host host = Host.getHost(0);
VM server1 = host.getVM(0);
@@ -1358,10 +1389,12 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testCommitWithPRAccessor() {
doTxWithPRAccessor(true);
}
+ @Test
public void testRollbackWithPRAccessor() {
doTxWithPRAccessor(false);
}
@@ -1445,6 +1478,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* there is one txState and zero or more txProxyStates
* @throws Exception
*/
+ @Test
public void testConnectionAffinity() throws Exception {
Host host = Host.getHost(0);
VM server1 = host.getVM(0);
@@ -1536,6 +1570,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* pool connects to the accessor and datastore
* we then close the server in the accessor and verify failover
*/
+ @Test
public void testFailover() {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -1545,6 +1580,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
doFailoverWork(accessor, null, datastore, client, true, false);
}
+ @Test
public void testFailoverAndCachingProxy() {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -1558,6 +1594,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* pool connects to two accessors.
* we then close the server in first accessor and verify failover
*/
+ @Test
public void testFailoverWithP2PMessaging() {
Host host = Host.getHost(0);
VM accessor1 = host.getVM(0);
@@ -1568,6 +1605,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
doFailoverWork(accessor1, accessor2, datastore, client, false, false);
}
+ @Test
public void testFailoverWithP2PMessagingAndCachingProxy() {
Host host = Host.getHost(0);
VM accessor1 = host.getVM(0);
@@ -1669,6 +1707,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testGetEntry() {
Host host = Host.getHost(0);
//VM accessor = host.getVM(0);
@@ -1722,6 +1761,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
+ @Test
public void testBug42920() {
Host host = Host.getHost(0);
VM datastore = host.getVM(1);
@@ -1934,6 +1974,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testTXListenerOnRedundant() {
Host host = Host.getHost(0);
VM datastore1 = host.getVM(0);
@@ -1982,6 +2023,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
assertEquals(1, listenerInvokedCount);
}
+ @Test
public void testBasicFunctionExecution() {
Host host = Host.getHost(0);
VM datastore = host.getVM(0);
@@ -1989,6 +2031,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
doBasicFunctionExecution(client, null, datastore);
}
+ @Test
public void testRemotedFunctionExecution() {
Host host = Host.getHost(0);
VM datastore = host.getVM(0);
@@ -2071,6 +2114,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testEmptyTX() {
Host host = Host.getHost(0);
VM datastore = host.getVM(0);
@@ -2090,6 +2134,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testSuspendResumeOnDifferentThreads() {
Host host = Host.getHost(0);
VM server1 = host.getVM(0);
@@ -2148,177 +2193,221 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
@Override
+ @Test
public void testPRTXGet() {
}
@Override
+ @Test
public void testPRTXGetOnRemoteWithLoader() {
}
@Override
+ @Test
public void testPRTXGetEntryOnRemoteSide() {
}
@Override
+ @Test
public void testPRTXGetOnLocalWithLoader() {
}
@Override
+ @Test
public void testNonColocatedTX() {
}
@Override
+ @Test
public void testRemoteExceptionThrown() {
}
@Override
+ @Test
public void testSizeForTXHostedOnRemoteNode() {
}
@Override
+ @Test
public void testSizeOnAccessor() {
}
@Override
+ @Test
public void testKeysIterator() {
}
@Override
+ @Test
public void testValuesIterator() {
}
@Override
+ @Test
public void testEntriesIterator() {
}
@Override
+ @Test
public void testKeysIterator1() {
}
@Override
+ @Test
public void testValuesIterator1() {
}
@Override
+ @Test
public void testEntriesIterator1() {
}
@Override
+ @Test
public void testKeysIteratorOnDestroy() {
}
@Override
+ @Test
public void testValuesIteratorOnDestroy() {
}
@Override
+ @Test
public void testEntriesIteratorOnDestroy() {
}
@Override
+ @Test
public void testKeysIterator1OnDestroy() {
}
@Override
+ @Test
public void testValuesIterator1OnDestroy() {
}
@Override
+ @Test
public void testEntriesIterator1OnDestroy() {
}
@Override
+ @Test
public void testKeyIterationOnRR() {
}
@Override
+ @Test
public void testValuesIterationOnRR() {
}
@Override
+ @Test
public void testEntriesIterationOnRR() {
}
@Override
+ @Test
public void testIllegalIteration() {
}
@Override
+ @Test
public void testTxFunctionOnRegion() {
}
@Override
+ @Test
public void testTxFunctionOnMember() {
}
@Override
+ @Test
public void testNestedTxFunction() {
}
@Override
+ @Test
public void testDRFunctionExecution() {
}
@Override
+ @Test
public void testTxFunctionWithOtherOps() {
}
@Override
+ @Test
public void testRemoteJTACommit() {
}
@Override
+ @Test
public void testRemoteJTARollback() {
}
@Override
+ @Test
public void testOriginRemoteIsTrueForRemoteReplicatedRegions() {
}
@Override
+ @Test
public void testRemoteCreateInReplicatedRegion() {
}
@Override
+ @Test
public void testRemoteTxCleanupOnCrash() {
}
@Override
+ @Test
public void testNonColocatedPutAll() {
}
@Override
+ @Test
public void testDestroyCreateConflation() {
}
@Override
+ @Test
public void testTXWithRI() throws Exception {
}
@Override
+ @Test
public void testBug43176() {
}
@Override
+ @Test
public void testTXWithRICommitInDatastore() throws Exception {
}
@Override
+ @Test
public void testListenersNotInvokedOnSecondary() {
}
@Override
+ @Test
public void testBug33073() {
}
@Override
+ @Test
public void testBug43081() throws Exception {
}
@Override
+ @Test
public void testBug45556() {
}
+ @Test
public void testBug42942() {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -2361,6 +2450,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testOnlyGet() {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -2382,6 +2472,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testBug43237() {
Host host = Host.getHost(0);
VM server = host.getVM(0);
@@ -2457,6 +2548,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* start 3 servers, accessor has r1 and r2; ds1 has r1, ds2 has r2
* stop server after distributing commit but b4 replying to client
*/
+ @Test
public void testFailoverAfterCommitDistribution() {
Host host = Host.getHost(0);
VM accessor = host.getVM(0);
@@ -2571,6 +2663,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* start a tx in a thread, obtain local locks and wait. start
* another tx and commit, make sure 2nd thread gets CCE
*/
+ @Test
public void testClientTxLocks() {
Host host = Host.getHost(0);
VM server = host.getVM(0);
@@ -2653,6 +2746,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
}
}
+ @Test
public void testBasicResumableTX() {
disconnectAllFromDS();
Host host = Host.getHost(0);
@@ -2694,10 +2788,12 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* transactional ops in functions, commit is done using internal
* ClientCommitFunction.
*/
+ @Test
public void testClientCommitFunction() {
doFunctionWork(true);
}
+ @Test
public void testClientRollbackFunction() {
doFunctionWork(false);
}
@@ -2801,9 +2897,11 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
}
}
+ @Test
public void testClientCommitFunctionWithFailure() {
doFunctionWithFailureWork(true);
}
+ @Test
public void testRollbackFunctionWithFailure() {
doFunctionWithFailureWork(false);
}
@@ -2876,9 +2974,11 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* start an accessor and two peers, then commit transaction
* from accessor
*/
+ @Test
public void testCommitFunctionFromPeer() {
doTestFunctionFromPeer(true);
}
+ @Test
public void testRollbackFunctionFromPeer() {
doTestFunctionFromPeer(false);
}
@@ -2933,6 +3033,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testBug43752() {
disconnectAllFromDS();
Host host = Host.getHost(0);
@@ -2962,6 +3063,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
});
}
+ @Test
public void testSuspendTimeout() throws Exception {
Host host = Host.getHost(0);
VM server = host.getVM(0);
@@ -3016,6 +3118,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
/**
* test that re-tried operations from client do not result in multiple ops in tx
*/
+ @Test
public void testEventTracker() {
Host host = Host.getHost(0);
VM delegate = host.getVM(0);
@@ -3126,6 +3229,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* verify that the exception does not cause the client to failover to the second server
* see bug 51666
*/
+ @Test
public void testTransactionException() {
disconnectAllFromDS();
Host host = Host.getHost(0);
@@ -3218,6 +3322,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
* that the client ignores this region.
* see bug 51922
*/
+ @Test
public void testNotAllRegionsHaveClient() {
disconnectAllFromDS();
Host host = Host.getHost(0);
@@ -3284,6 +3389,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
}
+ @Test
public void testAdjunctMessage() {
Host host = Host.getHost(0);
VM server1 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentDestroySubRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentDestroySubRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentDestroySubRegionDUnitTest.java
index 6c1dac1..ab3a5de 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentDestroySubRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentDestroySubRegionDUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DataPolicy;
@@ -32,7 +41,8 @@ import com.gemstone.gemfire.test.dunit.VM;
/**
*
*/
-public class ConcurrentDestroySubRegionDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class ConcurrentDestroySubRegionDUnitTest extends JUnit4CacheTestCase {
@Override
public final void postSetUp() throws Exception {
@@ -45,10 +55,11 @@ public class ConcurrentDestroySubRegionDUnitTest extends CacheTestCase {
/**
* @param name
*/
- public ConcurrentDestroySubRegionDUnitTest(String name) {
- super(name);
+ public ConcurrentDestroySubRegionDUnitTest() {
+ super();
}
+ @Test
public void test() throws Throwable {
final Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
@@ -109,6 +120,7 @@ public class ConcurrentDestroySubRegionDUnitTest extends CacheTestCase {
}
}
+ @Test
public void testPartitionedRegion() throws Throwable {
final Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
index da2cc95..6a6b650 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
@@ -19,6 +19,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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;
@@ -62,7 +71,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
* tests for the concurrentMapOperations. there are more tests in ClientServerMiscDUnitTest
*
*/
-public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class ConcurrentMapOpsDUnitTest extends JUnit4CacheTestCase {
protected static final String REP_REG_NAME = "repRegion";
protected static final String PR_REG_NAME = "prRegion";
@@ -211,11 +221,12 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
/**
* @param name
*/
- public ConcurrentMapOpsDUnitTest(String name) {
- super(name);
+ public ConcurrentMapOpsDUnitTest() {
+ super();
}
// test for bug #42164
+ @Test
public void testListenerNotInvokedForRejectedOperation() {
Host host = Host.getHost(0);
VM vm1 = host.getVM(0);
@@ -335,10 +346,12 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
});
}
+ @Test
public void testBug42162() {
dotestConcOps(false);
}
+ @Test
public void testBug42162EmptyClient() {
dotestConcOps(true);
}
@@ -474,6 +487,7 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
});
}
+ @Test
public void testNullValueFromNonEmptyClients() {
Host host = Host.getHost(0);
VM server = host.getVM(0);
@@ -507,10 +521,12 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
});
}
+ @Test
public void testPutIfAbsent() {
doPutIfAbsentWork(false);
}
+ @Test
public void testPutIfAbsentCS() {
doPutIfAbsentWork(true);
}
@@ -558,10 +574,12 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
});
}
+ @Test
public void testRemove() {
doRemoveWork(false);
}
+ @Test
public void testRemoveCS() {
doRemoveWork(true);
}
@@ -620,10 +638,12 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
});
}
+ @Test
public void testReplaceCS() {
doReplaceWork(true);
}
+ @Test
public void testReplace() {
doReplaceWork(false);
}
@@ -685,15 +705,19 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
});
}
+ @Test
public void testBug42167() {
do42167Work(false, REP_REG_NAME);
}
+ @Test
public void testBug42167PR() {
do42167Work(false, PR_REG_NAME);
}
+ @Test
public void testBug42167Empty() {
do42167Work(true, REP_REG_NAME);
}
+ @Test
public void testBug42167EmptyPR() {
do42167Work(true, PR_REG_NAME);
}
@@ -770,9 +794,11 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
});
}
+ @Test
public void testBug42189() {
doBug42189Work(REP_REG_NAME);
}
+ @Test
public void testBug42189PR() {
doBug42189Work(PR_REG_NAME);
}
@@ -847,9 +873,11 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
});
}
+ @Test
public void testReplacePutsKeyInLocalClientCache() {
doReplacePutsKeyInLocalClientCacheWork(REP_REG_NAME);
}
+ @Test
public void testReplacePutsKeyInLocalClientCachePR() {
doReplacePutsKeyInLocalClientCacheWork(PR_REG_NAME);
}
@@ -972,15 +1000,19 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
}
});
}
+ @Test
public void testWithDelta() {
doTestWithDeltaWork(false, REP_REG_NAME);
}
+ @Test
public void testWithDeltaPR() {
doTestWithDeltaWork(false, PR_REG_NAME);
}
+ @Test
public void testWithDeltaCS() {
doTestWithDeltaWork(true, REP_REG_NAME);
}
+ @Test
public void testWithDeltaPRCS() {
doTestWithDeltaWork(true, PR_REG_NAME);
}
@@ -1016,26 +1048,32 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
}
/** test putIfAbsent with failover & retry. This is bugs 42559 and 43640 */
+ @Test
public void testRetriedPutIfAbsent() throws Exception {
doRetriedOperation(Operation.PUT_IF_ABSENT, false);
}
+ @Test
public void testRetriedReplace() throws Exception {
doRetriedOperation(Operation.REPLACE, false);
}
+ @Test
public void testRetriedRemove() throws Exception {
doRetriedOperation(Operation.REMOVE, false);
}
+ @Test
public void testRetriedPutIfAbsentPR() throws Exception {
doRetriedOperation(Operation.PUT_IF_ABSENT, false);
}
+ @Test
public void testRetriedReplacePR() throws Exception {
doRetriedOperation(Operation.REPLACE, false);
}
+ @Test
public void testRetriedRemovePR() throws Exception {
doRetriedOperation(Operation.REMOVE, false);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
index 680fa84..dbafc88 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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;
@@ -47,7 +56,8 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
/** A test of 46438 - missing response to an update attributes message */
-public class ConnectDisconnectDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class ConnectDisconnectDUnitTest extends JUnit4CacheTestCase {
static {
// System.setProperty("DistributionManager.VERBOSE", "true");
@@ -56,12 +66,13 @@ public class ConnectDisconnectDUnitTest extends CacheTestCase {
private IgnoredException ex;
- public ConnectDisconnectDUnitTest(String name) {
- super(name);
+ public ConnectDisconnectDUnitTest() {
+ super();
}
// see bugs #50785 and #46438
+ @Test
public void testManyConnectsAndDisconnects() throws Throwable {
// invokeInEveryVM(new SerializableRunnable() {
//
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java
index 78855fd..83436da 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaFaultInDUnitTest.java
@@ -16,6 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DataPolicy;
@@ -35,16 +44,18 @@ import com.gemstone.gemfire.test.dunit.VM;
* we fault out and in a delta object.
*
*/
-public class DeltaFaultInDUnitTest extends CacheTestCase {
+@Category(DistributedTest.class)
+public class DeltaFaultInDUnitTest extends JUnit4CacheTestCase {
/**
* @param name
*/
- public DeltaFaultInDUnitTest(String name) {
- super(name);
+ public DeltaFaultInDUnitTest() {
+ super();
}
+ @Test
public void test() throws Exception {
final Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f83cc548/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
index 3a49515..1c57e29 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
@@ -19,6 +19,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+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.util.Properties;
@@ -69,7 +78,8 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
/**
* @since 6.1
*/
-public class DeltaPropagationDUnitTest extends DistributedTestCase {
+@Category(DistributedTest.class)
+public class DeltaPropagationDUnitTest extends JUnit4DistributedTestCase {
private final static Compressor compressor = SnappyCompressor.getDefaultInstance();
protected static Cache cache = null;
@@ -145,8 +155,8 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
/**
* @param name
*/
- public DeltaPropagationDUnitTest(String name) {
- super(name);
+ public DeltaPropagationDUnitTest() {
+ super();
}
@Override
@@ -179,6 +189,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
disconnectAllFromDS();
}
+ @Test
public void testS2CSuccessfulDeltaPropagationWithCompression() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache(
HARegionQueue.HA_EVICTION_POLICY_NONE, new Integer(1),
@@ -211,6 +222,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
assertTrue(listenerError.toString(), areListenerResultsValid);
}
+ @Test
public void testS2CSuccessfulDeltaPropagation() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -236,6 +248,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
assertTrue(listenerError.toString(), areListenerResultsValid);
}
+ @Test
public void testS2CFailureInToDeltaMethod() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -270,6 +283,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
assertTrue(listenerError.toString(), areListenerResultsValid);
}
+ @Test
public void testS2CFailureInFromDeltaMethod() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -298,6 +312,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
assertTrue(listenerError.toString(), areListenerResultsValid);
}
+ @Test
public void testS2CWithOldValueAtClientOverflownToDisk() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -332,6 +347,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
assertTrue(listenerError.toString(), areListenerResultsValid);
}
+ @Test
public void testS2CWithLocallyDestroyedOldValueAtClient() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -366,6 +382,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
verifyData(4, EVENTS_SIZE - 2);
}
+ @Test
public void testS2CWithInvalidatedOldValueAtClient() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -395,6 +412,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
assertTrue(listenerError.toString(), areListenerResultsValid);
}
+ @Test
public void testS2CDeltaPropagationWithClientConflationON() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -414,6 +432,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
.getFromDeltaInvokations().longValue() == 0);
}
+ @Test
public void testS2CDeltaPropagationWithServerConflationON() throws Exception {
VM0.invoke(() -> DeltaPropagationDUnitTest.closeCache());
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache(
@@ -446,6 +465,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
(fromDeltaInvocations == (EVENTS_SIZE - 1)));
}
+ @Test
public void testS2CDeltaPropagationWithOnlyCreateEvents() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -468,6 +488,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
*
* @throws Exception
*/
+ @Test
public void testC2S2SDeltaPropagation() throws Exception {
prepareDeltas();
VM0.invoke(() -> DeltaPropagationDUnitTest.prepareDeltas());
@@ -515,6 +536,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
.deltaFeatureUsed());
}
+ @Test
public void testS2S2CDeltaPropagationWithHAOverflow() throws Exception {
prepareDeltas();
VM0.invoke(() -> DeltaPropagationDUnitTest.prepareDeltas());
@@ -562,6 +584,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
+ fromDeltasOnClient, fromDeltasOnClient == (EVENTS_SIZE - 1));
}
+ @Test
public void testS2CDeltaPropagationWithGIIAndFailover() throws Exception {
prepareDeltas();
VM0.invoke(() -> DeltaPropagationDUnitTest.prepareDeltas());
@@ -630,6 +653,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
}
}
+ @Test
public void testBug40165ClientReconnects() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -700,6 +724,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
}
+ @Test
public void testBug40165ClientFailsOver() throws Exception {
PORT1 = ((Integer)VM0.invoke(() -> DeltaPropagationDUnitTest.createServerCache( HARegionQueue.HA_EVICTION_POLICY_MEMORY ))).intValue();
@@ -1080,7 +1105,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
public static Integer createServerCache(String ePolicy, Integer cap,
Integer listenerCode, Boolean conflate, Compressor compressor) throws Exception {
ConnectionTable.threadWantsSharedResources();
- new DeltaPropagationDUnitTest("temp").createCache(new Properties());
+ new DeltaPropagationDUnitTest().createCache(new Properties());
AttributesFactory factory = new AttributesFactory();
factory.setEnableSubscriptionConflation(conflate);
if (listenerCode.intValue() != 0) {
@@ -1331,7 +1356,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
props.setProperty(DistributionConfig.LOCATORS_NAME, "");
props.setProperty(DistributionConfig.CLIENT_CONFLATION_PROP_NAME, conflate);
- new DeltaPropagationDUnitTest("temp").createCache(props);
+ new DeltaPropagationDUnitTest().createCache(props);
AttributesFactory factory = new AttributesFactory();
pool = ClientServerTestCase.configureConnectionPool(factory, "localhost", ports,
true, Integer.parseInt(rLevel), 2, null, 1000, 250, false, -2);
@@ -1394,7 +1419,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
public static void createDurableCacheClient(Pool poolAttr, String regionName,
Properties dsProperties, Integer listenerCode, Boolean close) throws Exception {
- new DeltaPropagationDUnitTest("temp").createCache(dsProperties);
+ new DeltaPropagationDUnitTest().createCache(dsProperties);
PoolFactoryImpl pf = (PoolFactoryImpl)PoolManager.createFactory();
pf.init(poolAttr);
PoolImpl p = (PoolImpl)pf.create("DeltaPropagationDUnitTest");