geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hiteshkhame...@apache.org
Subject [40/50] [abbrv] incubator-geode git commit: GEODE-1372 Added auto reconnect test with UDP Encryption.
Date Thu, 18 Aug 2016 19:27:58 GMT
GEODE-1372 Added auto reconnect test with UDP Encryption.

Now we clear cache copy of ciphers when we reset member key


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

Branch: refs/heads/feature/GEODE-1372
Commit: 3badaabfd817ef61e0ed774c24346a7c6632ded8
Parents: 1ff2599
Author: Hitesh Khamesra <hiteshk25@yahoo.com>
Authored: Mon Jun 6 16:17:18 2016 -0700
Committer: Hitesh Khamesra <hkhamesra@pivotal.io>
Committed: Tue Aug 16 13:46:21 2016 -0700

----------------------------------------------------------------------
 .../membership/gms/messenger/GMSEncrypt.java       |  7 +++++++
 .../gemfire/cache30/ReconnectDUnitTest.java        |  5 ++++-
 .../cache30/ReconnectWithUDPSecurityDUnitTest.java | 17 +++++++++++++++++
 .../gms/messenger/GMSEncryptJUnitTest.java         |  1 -
 4 files changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3badaabf/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
index 1575864..2a6947b 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncrypt.java
@@ -169,6 +169,13 @@ public class GMSEncrypt implements Cloneable{
     try {
       //createPeerEncryptor(mbr, publickey);
       memberToPeerEncryptor.put(mbr, publickey);
+      synchronized (copyOfPeerEncryptors) {
+        //remove all the existing keys..
+        for(Map m : copyOfPeerEncryptors) {
+          if(m != null)
+            m.remove(mbr);
+        }
+      }
     }catch(Exception e) {
       throw new RuntimeException("Unable to create peer encryptor " +  mbr, e);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3badaabf/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
index 59fc206..4950057 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
@@ -122,7 +122,6 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase
   @Override
   public Properties getDistributedSystemProperties() {
     if (dsProperties == null) {
-      dsProperties = new Properties();
       dsProperties.put(MAX_WAIT_TIME_RECONNECT, "20000");
       dsProperties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
       dsProperties.put(DISABLE_AUTO_RECONNECT, "false");
@@ -131,6 +130,7 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase
       dsProperties.put(MCAST_PORT, "0");
       dsProperties.put(MEMBER_TIMEOUT, "1000");
       dsProperties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+      addDSProps(dsProperties);
     }
     return dsProperties;
   }
@@ -1274,4 +1274,7 @@ public class ReconnectDUnitTest extends JUnit4CacheTestCase
     }
 
   }
+
+  protected void addDSProps(Properties p) {
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3badaabf/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java
new file mode 100755
index 0000000..956d1fe
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectWithUDPSecurityDUnitTest.java
@@ -0,0 +1,17 @@
+package com.gemstone.gemfire.cache30;
+
+import java.util.Properties;
+
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
+public class ReconnectWithUDPSecurityDUnitTest extends ReconnectDUnitTest{
+
+  public ReconnectWithUDPSecurityDUnitTest() {
+    super();
+  }
+  
+  @Override
+  protected void addDSProps(Properties p) {
+    p.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, "AES:128");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3badaabf/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
index 30abb7d..1156295 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSEncryptJUnitTest.java
@@ -263,7 +263,6 @@ public class GMSEncryptJUnitTest {
       initMocks(algo);
 
       final GMSEncrypt gmsEncrypt1 = new GMSEncrypt(services, mockMembers[1]); // this will
be the sender
-      Thread.currentThread().sleep(100);
       gmsEncrypt1.initClusterSecretKey();
       final GMSEncrypt gmsEncrypt2 = new GMSEncrypt(services, mockMembers[2]); // this will
be the sender
 


Mime
View raw message