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/26 23:42:03 UTC
incubator-geode git commit: Cleanup of junit3 to junit4 conversion of
dunit tests.
Repository: incubator-geode
Updated Branches:
refs/heads/feature/GEODE-837 e4a8f6f54 -> 3cd19bde6
Cleanup of junit3 to junit4 conversion of dunit tests.
* move disk setup in DiskDistributedNoAckRegionTestCase from ctor to setup
* remove dead code
* change scope of some methods and vars to private
* add TODOs for further cleanup work
* reorganize imports
* remove unecessary type casts
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3cd19bde
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3cd19bde
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3cd19bde
Branch: refs/heads/feature/GEODE-837
Commit: 3cd19bde661d5804d4a68f41528c904154164503
Parents: e4a8f6f
Author: Kirk Lund <kl...@apache.org>
Authored: Thu May 26 16:35:44 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Thu May 26 16:40:44 2016 -0700
----------------------------------------------------------------------
.../DiskDistributedNoAckRegionTestCase.java | 18 ++-----
...ributedNoAckSyncOverflowRegionDUnitTest.java | 19 ++------
.../gemfire/cache30/DiskRegionTestImpl.java | 14 +++---
.../DistributedNoAckRegionDUnitTest.java | 43 ++++++-----------
.../gemfire/cache30/MultiVMRegionTestCase.java | 50 +++-----------------
.../gemfire/cache30/RegionTestCase.java | 18 +------
.../cache/internal/JUnit4CacheTestCase.java | 41 +++++++++++-----
.../internal/JUnit4DistributedTestCase.java | 1 +
8 files changed, 67 insertions(+), 137 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd19bde/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java
index ea7b646..232d44a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java
@@ -16,25 +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 com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.CacheException;
public abstract class DiskDistributedNoAckRegionTestCase extends DistributedNoAckRegionDUnitTest {
- final protected DiskRegionTestImpl regionTestImpl;
+ protected DiskRegionTestImpl regionTestImpl;
- /** Creates a new instance of DiskDistributedNoAckRegionTest */
- public DiskDistributedNoAckRegionTestCase() {
- super();
- regionTestImpl = new DiskRegionTestImpl(this);
+ @Override
+ public final void postSetUp() throws Exception {
+ this.regionTestImpl = new DiskRegionTestImpl(this);
}
@Test
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd19bde/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckSyncOverflowRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckSyncOverflowRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckSyncOverflowRegionDUnitTest.java
index 5668ce6..40ed127 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckSyncOverflowRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckSyncOverflowRegionDUnitTest.java
@@ -16,30 +16,19 @@
*/
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 org.junit.experimental.categories.Category;
+
import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.DiskWriteAttributes;
+import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.EvictionAction;
import com.gemstone.gemfire.cache.EvictionAttributes;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.internal.OSProcess;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-/**
- *
- *
- */
@Category(DistributedTest.class)
public class DiskDistributedNoAckSyncOverflowRegionDUnitTest extends DiskDistributedNoAckRegionTestCase {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd19bde/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionTestImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionTestImpl.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionTestImpl.java
index ec2a430..9179312 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionTestImpl.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskRegionTestImpl.java
@@ -35,10 +35,14 @@ import com.gemstone.gemfire.test.dunit.VM;
* An instance of this class is delegated to by test classes that test
* disk regions.
*
- *
+ * Used by: DiskDistributedNoAckRegionTestCase
+ * TODO: move this content into DiskDistributedNoAckRegionTestCase
*/
public class DiskRegionTestImpl implements Serializable {
-
+
+ private static final int NUM_ENTRIES = 1000;
+ private static final int VALUE_SIZE = 2000;
+
final RegionTestCase rtc;
private CacheSerializableRunnable createRgnRunnable(final String name) {
@@ -64,12 +68,6 @@ public class DiskRegionTestImpl implements Serializable {
vm0.invoke(createRgnRunnable(name));
}
-
-
-
-
- private static final int NUM_ENTRIES = 1000;
- private static final int VALUE_SIZE = 2000;
/**
* Tests fillValues on backup regions.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd19bde/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java
index e461f40..6fbd185 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java
@@ -16,18 +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.Arrays;
import java.util.Set;
+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.CacheException;
import com.gemstone.gemfire.cache.DataPolicy;
@@ -46,6 +43,7 @@ import com.gemstone.gemfire.test.dunit.ThreadUtils;
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;
/**
* This class tests the functionality of a cache {@link Region region}
@@ -57,10 +55,6 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
@Category(DistributedTest.class)
public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
- public DistributedNoAckRegionDUnitTest() {
- super();
- }
-
/**
* Returns region attributes for a <code>GLOBAL</code> region
*/
@@ -72,13 +66,12 @@ public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
return factory.create();
}
- ////////////////////// Test Methods //////////////////////
-
- /** Tests creating a distributed subregion of a local scope region,
+ /**
+ * Tests creating a distributed subregion of a local scope region,
* which should fail.
*/
@Test
- public void testDistSubregionOfLocalRegion() throws CacheException {
+ public void testDistSubregionOfLocalRegion() throws Exception {
// creating a distributed subregion of a LOCAL region is illegal.
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -99,8 +92,7 @@ public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
* @see Region#createSubregion
*/
@Test
- public void testIncompatibleSubregions()
- throws CacheException, InterruptedException {
+ public void testIncompatibleSubregions() throws Exception {
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
VM vm1 = host.getVM(1);
@@ -133,17 +125,16 @@ public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
try {
createRootRegion( "INCOMPATIBLE_ROOT", factory.create());
fail("Should have thrown an IllegalStateException");
-// createRegion(name, factory.create());
} catch (IllegalStateException ex) {
// pass...
}
-// assertNull(getRootRegion());
} catch (CacheException ex) {
Assert.fail("While creating GLOBAL Region", ex);
}
}
});
+
vm1.invoke(new SerializableRunnable("Create ACK Region") {
public void run() {
try {
@@ -154,11 +145,9 @@ public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
try {
createRootRegion( "INCOMPATIBLE_ROOT", factory.create());
fail("Should have thrown an IllegalStateException");
-// createRegion(name, factory.create());
} catch (IllegalStateException ex) {
// pass...
}
-// assertNull(getRootRegion());
} catch (CacheException ex) {
Assert.fail("While creating ACK Region", ex);
@@ -168,6 +157,7 @@ public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
}
private static final int CHUNK_SIZE = 500 * 1024; // == InitialImageOperation.CHUNK_SIZE_IN_BYTES
+
// use sizes so it completes in < 15 sec, but hangs if bug exists
private static final int NUM_ENTRIES_VM = 15000;
private static final int VALUE_SIZE_VM = CHUNK_SIZE * 150 / NUM_ENTRIES_VM;
@@ -182,7 +172,9 @@ public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
* and GII is now non-blocking (bug 30705 was caused blocking gii).
* This test can take a long time to run on disk regions.
*/
- public void disabled_testBug30705() throws InterruptedException {
+ @Ignore("TODO")
+ @Test
+ public void testBug30705() throws Exception {
final String name = this.getUniqueName();
final int numEntries = NUM_ENTRIES_VM;
final int valueSize = VALUE_SIZE_VM;
@@ -225,7 +217,6 @@ public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
}
};
-
vm0.invoke(create);
vm0.invoke(new CacheSerializableRunnable("Put data") {
@@ -275,12 +266,6 @@ public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
}
};
Wait.waitForCriterion(ev, 30 * 1000, 200, true);
-// pause(100);
-// try {
-// getRootRegion().getSubregion(name).destroyRegion();
-// } catch (OperationAbortedException ignore) {
-// }
-// closeCache();
}
});
} // finally
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd19bde/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
index 7f0c136..8648b86 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
@@ -16,23 +16,13 @@
*/
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 static com.gemstone.gemfire.internal.lang.ThrowableUtils.*;
+import static org.junit.Assert.*;
import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
-import java.io.DataOutputStream;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
@@ -53,9 +43,10 @@ import java.util.concurrent.LinkedBlockingQueue;
import junit.framework.Assert;
import junit.framework.AssertionFailedError;
-
import org.apache.logging.log4j.Logger;
+import org.junit.AfterClass;
import org.junit.Ignore;
+import org.junit.Test;
import org.junit.experimental.categories.Category;
import com.gemstone.gemfire.DataSerializable;
@@ -117,9 +108,7 @@ import com.gemstone.gemfire.internal.cache.TXStateProxy;
import com.gemstone.gemfire.internal.cache.Token;
import com.gemstone.gemfire.internal.cache.TombstoneService;
import com.gemstone.gemfire.internal.cache.delta.Delta;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionHolder;
import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
-import com.gemstone.gemfire.internal.cache.versions.VMRegionVersionVector;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
@@ -128,15 +117,14 @@ import com.gemstone.gemfire.test.dunit.AsyncInvocation;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.RMIException;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.ThreadUtils;
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.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
/**
@@ -150,33 +138,19 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
Properties props = new Properties();
final int putRange_1Start = 1;
-
final int putRange_1End = 5;
-
final int putRange_2Start = 6;
-
final int putRange_2End = 10;
-
final int putRange_3Start = 11;
-
final int putRange_3End = 15;
-
final int putRange_4Start = 16;
-
final int putRange_4End = 20;
-
final int removeRange_1Start = 2;
-
final int removeRange_1End = 4;
-
final int removeRange_2Start = 7;
-
final int removeRange_2End = 9;
- public MultiVMRegionTestCase() {
- super();
- }
-
+ @AfterClass
public static void caseTearDown() throws Exception {
disconnectAllFromDS();
}
@@ -186,18 +160,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
CCRegion = null;
}
- // @todo can be used in tests
-// protected CacheSerializableRunnable createRegionTask(final String name) {
-// return new CacheSerializableRunnable("Create Region") {
-// public void run2() throws CacheException {
-// assertNotNull(createRegion(name));
-// }
-// };
-// }
-
-
- //////// Test Methods
-
/**
* This is a for the ConcurrentMap operations.
* 4 VMs are used to
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd19bde/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
index d7e4c3d..194cd80 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
@@ -16,15 +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.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@ -41,6 +34,7 @@ import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;
+import org.junit.Test;
import org.junit.experimental.categories.Category;
import com.gemstone.gemfire.LogWriter;
@@ -74,6 +68,7 @@ import com.gemstone.gemfire.test.dunit.Invoke;
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.FlakyTest;
/**
@@ -115,10 +110,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
subrgnWriter = null;
}
- public RegionTestCase() {
- super();
- }
-
@Override
public final void postTearDownCacheTestCase() throws Exception {
cleanup();
@@ -129,8 +120,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
protected void postTearDownRegionTestCase() throws Exception {
}
- //////// Helper methods
-
/**
* Returns a region with the given name and the attributes for this
* test.
@@ -155,7 +144,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
*/
protected abstract RegionAttributes getRegionAttributes();
-
/** pauses only if no ack */
protected void pauseIfNecessary() {
}
@@ -171,8 +159,6 @@ public abstract class RegionTestCase extends JUnit4CacheTestCase {
// Only needed for no-ack regions
}
- ////////////////////// Test Methods //////////////////////
-
/**
* Tests that creating an entry in a region actually creates it
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd19bde/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java
index 2d507d5..59dfffb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java
@@ -16,7 +16,27 @@
*/
package com.gemstone.gemfire.test.dunit.cache.internal;
-import com.gemstone.gemfire.cache.*;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.logging.log4j.Logger;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache.CacheExistsException;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.CacheTransactionManager;
+import com.gemstone.gemfire.cache.ExpirationAttributes;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.RegionExistsException;
+import com.gemstone.gemfire.cache.TimeoutException;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
@@ -29,17 +49,14 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.dunit.*;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
-import org.apache.logging.log4j.Logger;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.Properties;
/**
* This class is the base class for all distributed tests using JUnit 4 that
@@ -63,7 +80,7 @@ public abstract class JUnit4CacheTestCase extends JUnit4DistributedTestCase impl
private final CacheTestFixture cacheTestFixture;
public JUnit4CacheTestCase() {
- this((CacheTestFixture)null);
+ this(null);
}
JUnit4CacheTestCase(final CacheTestFixture cacheTestFixture) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3cd19bde/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
index 8678095..5a1e84e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -333,6 +333,7 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
* name of the class as well as the name of the method.
*/
public final String getUniqueName() {
+ assertNotNull(getName());
return getTestClass().getSimpleName() + "_" + getName();
}