You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/06/07 23:52:33 UTC
incubator-geode git commit: Fixup
Repository: incubator-geode
Updated Branches:
refs/heads/feature/GEODE-837 470cd73ea -> 5706e6638
Fixup
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5706e663
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5706e663
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5706e663
Branch: refs/heads/feature/GEODE-837
Commit: 5706e66389e0829829f760a558b0899bdeddd911
Parents: 470cd73
Author: Kirk Lund <kl...@apache.org>
Authored: Tue Jun 7 16:52:31 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Tue Jun 7 16:52:31 2016 -0700
----------------------------------------------------------------------
.../gemfire/cache30/MultiVMRegionTestCase.java | 62 ++++----------------
.../disttx/DistributedTransactionDUnitTest.java | 10 ++--
2 files changed, 16 insertions(+), 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5706e663/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 351e6e0..a8a512e 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
@@ -403,7 +403,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
* DISABLED 4-16-04 - the current implementation assumes events
* are processed synchronously, which is no longer true.
*/
- @Ignore("DISABLED 4-16-04 - the current implementation assumes events are processed synchronously, which is no longer true")
+ @Ignore("TODO: test is DISABLED 4-16-04 - the current implementation assumes events are processed synchronously, which is no longer true")
@Test
public void testOrderedUpdates() throws Exception {
assumeFalse(getRegionAttributes().getScope() == Scope.DISTRIBUTED_NO_ACK);
@@ -1703,7 +1703,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
final String name = this.getUniqueName();
final Object key = "KEY";
-// final Object value = "VALUE";
SerializableRunnable create =
new CacheSerializableRunnable("Create Region") {
@@ -1713,7 +1712,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
}
};
-
Host host = Host.getHost(0);
VM vm0 = host.getVM(0);
VM vm1 = host.getVM(1);
@@ -1772,10 +1770,8 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
// some tests use mirroring by default (e.g. persistBackup regions)
// if so, then this test won't work right
- if (getRegionAttributes().getDataPolicy().withReplication()
- || getRegionAttributes().getDataPolicy().isPreloaded()) {
- return;
- }
+ assumeFalse(getRegionAttributes().getDataPolicy().withReplication());
+ assumeFalse(getRegionAttributes().getDataPolicy().isPreloaded());
final String name = this.getUniqueName();
final Object key = this.getUniqueName();
@@ -1787,19 +1783,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
vm1.invoke(new CacheSerializableRunnable("set remote value") {
@Override
public void run2() throws CacheException {
-// final TestCacheLoader remoteloader = new TestCacheLoader() {
-// public Object load2(LoaderHelper helper)
-// throws CacheLoaderException {
-//
-// assertIndexDetailsEquals(key, helper.getKey());
-// assertIndexDetailsEquals(name, helper.getRegion().getName());
-// return value;
-// }
-// };
-//
-// AttributesFactory factory =
-// new AttributesFactory(getRegionAttributes());
-// factory.setCacheLoader(remoteloader);
Region rgn = createRegion(name);
rgn.put(key, value);
flushIfNecessary(rgn);
@@ -1850,7 +1833,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
}
});
-// com.gemstone.gemfire.internal.util.DebuggerSupport.waitForJavaDebugger(getLogWriter());
assertEquals(value, region.get(key));
// if global scope, then a netSearch is done BEFORE the loader is invoked,
// so we get the value but the loader is never invoked.
@@ -1867,12 +1849,9 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
public void testCacheLoaderWithNetLoad() throws Exception {
// replicated regions and partitioned regions make no sense for this
// test
- if (getRegionAttributes().getDataPolicy().withReplication() ||
- getRegionAttributes().getDataPolicy().isPreloaded() ||
- getRegionAttributes().getPartitionAttributes() != null)
- {
- return;
- }
+ assumeFalse(getRegionAttributes().getDataPolicy().withReplication());
+ assumeFalse(getRegionAttributes().getDataPolicy().isPreloaded());
+ assumeTrue(getRegionAttributes().getPartitionAttributes() == null);
final String name = this.getUniqueName();
final Object key = this.getUniqueName();
@@ -1937,7 +1916,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
assertNotNull(entry);
assertNull(entry.getValue());
-// com.gemstone.gemfire.internal.util.DebuggerSupport.waitForJavaDebugger(getLogWriter());
assertEquals(value, region.get(key));
assertTrue(loader1.wasInvoked());
@@ -1955,7 +1933,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
final String name = this.getUniqueName();
final Object key = "KEY";
-// final Object value = "VALUE";
SerializableRunnable create =
new CacheSerializableRunnable("Create Region") {
@@ -2033,7 +2010,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
public void run2() throws CacheException {
Region region =
getRootRegion().getSubregion(name);
-// DebuggerSupport.waitForJavaDebugger(getLogWriter());
assertEquals(value, region.get(key));
assertTrue(loader.wasInvoked());
}
@@ -2676,15 +2652,11 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
vm1.invoke(new CacheSerializableRunnable("Validate callback") {
@Override
public void run2() throws CacheException {
-// if (getRootRegion().getSubregion(name).getAttributes()
-// .getPartitionAttributes() == null) { // bug 36500 - remove check when fixed
- assertTrue(writer.wasInvoked());
-// }
+ assertTrue(writer.wasInvoked());
}
});
}
-
/**
* Tests that invoking <code>netSearch</code> in a remote loader
* returns <code>null</code> instead of causing infinite recursion.
@@ -3006,8 +2978,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
public void testReplicate() throws Exception {
assumeTrue(supportsReplication());
- //pauseIfNecessary(100); // wait for previous tearDown to complete
-
final String name = this.getUniqueName();
final Object key1 = "KEY1";
final Object value1 = "VALUE1";
@@ -3137,7 +3107,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
}
};
-
vm0.invoke(create);
vm0.invoke(new CacheSerializableRunnable("Put data") {
@@ -4975,7 +4944,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
});
}
- @Ignore("Disabled for 51542")
+ @Ignore("TODO: test is disabled for 51542")
@Test
public void testNBRegionInvalidationDuringGetInitialImage() throws Exception {
assumeTrue(supportsReplication());
@@ -7599,7 +7568,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
}
}
- @Ignore("TODO")
+ @Ignore("TODO: test is disabled")
@Test
public void testTXAlgebra() throws Exception {
assumeFalse(getRegionAttributes().getScope().isGlobal());
@@ -8376,18 +8345,13 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
}
}
}
-
-
+
private RegionVersionVector getVersionVector(VM vm) throws Exception {
byte[] serializedForm = (byte[])vm.invoke(() -> this.getCCRegionVersionVector());
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(serializedForm));
return (RegionVersionVector)DataSerializer.readObject(dis);
}
-
-
-
-
-
+
/** comparison method that allows one or both arguments to be null */
private boolean notEqual(Object o1, Object o2) {
if (o1 == null) {
@@ -8462,10 +8426,6 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
waitForAsyncProcessing(a0, "");
waitForAsyncProcessing(a1, "");
-// if (a0failed && a1failed) {
-// fail("neither member saw event conflation - check stats for " + name);
-// }
-
// check consistency of the regions
Map r0Contents = (Map)vm0.invoke(() -> this.getCCRegionContents());
Map r1Contents = (Map)vm1.invoke(() -> this.getCCRegionContents());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5706e663/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
index 1684586..8f962f7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
@@ -72,12 +72,12 @@ import com.gemstone.gemfire.test.junit.categories.DistributedTest;
@Category(DistributedTest.class)
public class DistributedTransactionDUnitTest extends JUnit4CacheTestCase {
- final protected String CUSTOMER_PR = "customerPRRegion";
- final protected String ORDER_PR = "orderPRRegion";
- final protected String D_REFERENCE = "distrReference";
- final protected String PERSISTENT_CUSTOMER_PR = "persistentCustomerPRRegion";
+ protected final String CUSTOMER_PR = "customerPRRegion";
+ protected final String ORDER_PR = "orderPRRegion";
+ protected final String D_REFERENCE = "distrReference";
+ protected final String PERSISTENT_CUSTOMER_PR = "persistentCustomerPRRegion";
- final protected String CUSTOMER_RR = "customerRRRegion";
+ protected final String CUSTOMER_RR = "customerRRRegion";
@Override
public final void postSetUp() throws Exception{