You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2019/02/28 17:41:18 UTC

[geode] branch feature/GEODE-6468 created (now 861d149)

This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a change to branch feature/GEODE-6468
in repository https://gitbox.apache.org/repos/asf/geode.git.


      at 861d149  GEODE-6468 [CI Failure] ClusterCommunicationsDUnitTest fails on createEntryAndVerifyUpdate

This branch includes the following new commits:

     new 861d149  GEODE-6468 [CI Failure] ClusterCommunicationsDUnitTest fails on createEntryAndVerifyUpdate

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[geode] 01/01: GEODE-6468 [CI Failure] ClusterCommunicationsDUnitTest fails on createEntryAndVerifyUpdate

Posted by bs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a commit to branch feature/GEODE-6468
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 861d14970b277bbd96b283dd655e3969519b6a67
Author: Bruce Schuchardt <bs...@pivotal.io>
AuthorDate: Thu Feb 28 09:39:04 2019 -0800

    GEODE-6468 [CI Failure] ClusterCommunicationsDUnitTest fails on createEntryAndVerifyUpdate
    
    Modified Connection.java to not modify the app-data input buffer in the
    handshake thread after notifying the handshake waiter.
---
 .../java/org/apache/geode/ClusterCommunicationsDUnitTest.java  | 10 +++++-----
 .../main/java/org/apache/geode/internal/tcp/Connection.java    | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/geode-core/src/distributedTest/java/org/apache/geode/ClusterCommunicationsDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/ClusterCommunicationsDUnitTest.java
index c970f77..d549fae 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/ClusterCommunicationsDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/ClusterCommunicationsDUnitTest.java
@@ -70,6 +70,7 @@ import org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLe
 import org.apache.geode.internal.DSFIDFactory;
 import org.apache.geode.internal.cache.DirectReplyMessage;
 import org.apache.geode.test.dunit.Host;
+import org.apache.geode.test.dunit.IgnoredException;
 import org.apache.geode.test.dunit.Invoke;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.rules.DistributedRule;
@@ -126,7 +127,7 @@ public class ClusterCommunicationsDUnitTest implements java.io.Serializable {
   @Rule
   public final SerializableTestName testName = new SerializableTestName();
 
-  final String regionName = "clusterTestRegion";
+  private final String regionName = "clusterTestRegion";
 
   public ClusterCommunicationsDUnitTest(RunConfiguration runConfiguration) {
     this.useSSL = runConfiguration.useSSL;
@@ -145,6 +146,7 @@ public class ClusterCommunicationsDUnitTest implements java.io.Serializable {
 
   @Test
   public void createEntryAndVerifyUpdate() {
+    IgnoredException.addIgnoredException("Remote host closed connection during handshake");
     int locatorPort = createLocator(VM.getVM(0));
     for (int i = 1; i <= NUM_SERVERS; i++) {
       createCacheAndRegion(VM.getVM(i), locatorPort);
@@ -186,7 +188,7 @@ public class ClusterCommunicationsDUnitTest implements java.io.Serializable {
       VM.getVM(1).invoke("receive a large direct-reply message", () -> {
         SerialAckedMessageWithBigReply messageWithBigReply = new SerialAckedMessageWithBigReply();
         await().until(() -> {
-          messageWithBigReply.send(Collections.<DistributedMember>singleton(vm2ID));
+          messageWithBigReply.send(Collections.singleton(vm2ID));
           return true;
         });
       });
@@ -228,9 +230,7 @@ public class ClusterCommunicationsDUnitTest implements java.io.Serializable {
     createCacheAndRegion(server2VM, locatorPort);
 
     // roll server1 to the current version
-    server1VM.invoke("stop server1", () -> {
-      cache.close();
-    });
+    server1VM.invoke("stop server1", () -> cache.close());
     server1VM = Host.getHost(0).getVM(VersionManager.CURRENT_VERSION, 1);
     createCacheAndRegion(server1VM, locatorPort);
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java b/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
index e659496..2ba313e 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/tcp/Connection.java
@@ -756,6 +756,11 @@ public class Connection implements Runnable {
   }
 
   private void notifyHandshakeWaiter(boolean success) {
+    if (getConduit().useSSL() && ioFilter != null) {
+      // clear out any remaining handshake bytes
+      ByteBuffer buffer = ioFilter.getUnwrappedBuffer(inputBuffer);
+      buffer.position(0).limit(0);
+    }
     synchronized (this.handshakeSync) {
       if (success) {
         this.handshakeRead = true;
@@ -1588,11 +1593,6 @@ public class Connection implements Runnable {
         }
         asyncClose(false);
         this.owner.removeAndCloseThreadOwnedSockets();
-      } else {
-        if (getConduit().useSSL()) {
-          ByteBuffer buffer = ioFilter.getUnwrappedBuffer(inputBuffer);
-          buffer.position(0).limit(0);
-        }
       }
       releaseInputBuffer();