This is an automated email from the ASF dual-hosted git repository.
bschuchardt pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 6d1d82a GEODE-6468 [CI Failure] ClusterCommunicationsDUnitTest fails
on createEntryAndVerifyUpdate
6d1d82a is described below
commit 6d1d82a15a5c548b2aafeff8bf023d12044581e7
Author: Bruce Schuchardt <[email protected]>
AuthorDate: Thu Feb 28 16:44:30 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 | 11 ++++++-----
.../main/java/org/apache/geode/internal/tcp/Connection.java | 10 +++++-----
2 files changed, 11 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..1568740 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;
@@ -141,6 +142,8 @@ public class ClusterCommunicationsDUnitTest implements
java.io.Serializable {
this.useSSL = testWithSSL;
this.conserveSockets = testWithConserveSocketsTrue;
});
+ IgnoredException.addIgnoredException("Socket Closed");
+ IgnoredException.addIgnoredException("Remote host closed connection during
handshake");
}
@Test
@@ -186,7 +189,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 +231,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();