geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject incubator-geode git commit: GEODE-1108: Ensure that the maximum message size gets reset
Date Wed, 23 Mar 2016 18:22:17 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 1e985b810 -> 068d3bce1


GEODE-1108: Ensure that the maximum message size gets reset

The fix for GEODE-478 introduced a test that sets
gemfire.client.max-message-size but never unsets it. That caused later
tests to fail if they try to create a message that crosses this lower
threshold.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/068d3bce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/068d3bce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/068d3bce

Branch: refs/heads/develop
Commit: 068d3bce13868470c093aace1cf101356fcf27de
Parents: 1e985b8
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Wed Mar 23 10:50:30 2016 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Wed Mar 23 11:20:54 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/cache/tier/sockets/Message.java  | 3 ++-
 .../gemfire/test/dunit/internal/JUnit4DistributedTestCase.java | 2 ++
 .../wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java | 6 +++++-
 .../cache/wan/parallel/ParallelWANPropagationDUnitTest.java    | 2 +-
 4 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/068d3bce/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
index 44c88c1..bfe382c 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
@@ -82,10 +82,11 @@ import com.gemstone.gemfire.internal.util.BlobHelper;
  */
 public class Message  {
 
+  public static final int DEFAULT_MAX_MESSAGE_SIZE = 1073741824;
   /**
    * maximum size of an outgoing message.  See GEODE-478
    */
-  static final int MAX_MESSAGE_SIZE = Integer.getInteger("gemfire.client.max-message-size",
1073741824).intValue();
+  public static int MAX_MESSAGE_SIZE = Integer.getInteger("gemfire.client.max-message-size",
DEFAULT_MAX_MESSAGE_SIZE).intValue();
 
   private static final Logger logger = LogService.getLogger();
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/068d3bce/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 809fbd3..d5b5b6f 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
@@ -50,6 +50,7 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
+import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.management.internal.cli.LogWrapper;
@@ -564,6 +565,7 @@ public class JUnit4DistributedTestCase implements DistributedTestFixture,
Serial
     RegionTestCase.preSnapshotRegion = null;
     SocketCreator.resetHostNameCache();
     SocketCreator.resolve_dns = true;
+    Message.MAX_MESSAGE_SIZE = Message.DEFAULT_MAX_MESSAGE_SIZE;
 
     // clear system properties -- keep alphabetized
     System.clearProperty("gemfire.log-level");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/068d3bce/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index 258918f..4e66c6f 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -16,9 +16,13 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.parallel;
 
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
 import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionDestroyedException;
+import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
 import com.gemstone.gemfire.internal.cache.tier.sockets.MessageTooLargeException;
 import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
 import com.gemstone.gemfire.internal.cache.wan.GatewaySenderException;
@@ -586,7 +590,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
   }
 
   private void setMaximumMessageSize(int maximumMessageSizeBytes) {
-    System.setProperty("gemfire.client.max-message-size", String.valueOf(maximumMessageSizeBytes));
+    Message.MAX_MESSAGE_SIZE = maximumMessageSizeBytes;
     LogWriterUtils.getLogWriter().info("Set gemfire.client.max-message-size: " + System.getProperty("gemfire.client.max-message-size"));
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/068d3bce/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
index 40eb0de..d8d2585 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
@@ -561,7 +561,7 @@ public class ParallelWANPropagationDUnitTest extends WANTestBase {
   }
 
   
-  public void testParallelPropagationWihtOverflow() throws Exception {
+  public void testParallelPropagationWithOverflow() throws Exception {
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(
1 ));
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2,
lnPort ));
 


Mime
View raw message