Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-3249 9e68875df -> 793b16f62


GEODE_3249 Validate internal client/server messages

spotlessApply

GetClientPRMetaDataOp fix after running securityTest catetory of tests


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

Branch: refs/heads/feature/GEODE-3249
Commit: 793b16f623b4da788358e4bf16d14c20529797b8
Parents: 9e68875
Author: Bruce Schuchardt <bschucha...@pivotal.io>
Authored: Tue Aug 8 15:15:23 2017 -0700
Committer: Bruce Schuchardt <bschucha...@pivotal.io>
Committed: Tue Aug 8 15:15:23 2017 -0700

----------------------------------------------------------------------
 .../client/internal/GetClientPRMetaDataOp.java  | 14 --------
 .../cache/tier/sockets/ServerConnection.java    | 38 ++++++++++----------
 .../security/ClientAuthenticationTestCase.java  | 11 +++---
 .../security/ClientAuthorizationTestCase.java   |  3 +-
 .../test/dunit/standalone/VersionManager.java   |  2 --
 5 files changed, 27 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/793b16f6/geode-core/src/main/java/org/apache/geode/cache/client/internal/GetClientPRMetaDataOp.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/cache/client/internal/GetClientPRMetaDataOp.java
 
b/geode-core/src/main/java/org/apache/geode/cache/client/internal/GetClientPRMetaDataOp.java
index 2ba3e3a..ec843c3 100755
--- 
a/geode-core/src/main/java/org/apache/geode/cache/client/internal/GetClientPRMetaDataOp.java
+++ 
b/geode-core/src/main/java/org/apache/geode/cache/client/internal/GetClientPRMetaDataOp.java
@@ -67,20 +67,6 @@ public class GetClientPRMetaDataOp {
       getMessage().addStringPart(regionFullPath);
     }
 
-    @Override
-    protected void processSecureBytes(Connection cnx, Message message) throws 
Exception {}
-
-    @Override
-    protected boolean needsUserId() {
-      return false;
-    }
-
-    @Override
-    protected void sendMessage(Connection cnx) throws Exception {
-      getMessage().clearMessageHasSecurePartFlag();
-      getMessage().send(false);
-    }
-
     @SuppressWarnings("unchecked")
     @Override
     protected Object processResponse(Message msg) throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/793b16f6/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnection.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnection.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnection.java
index 7af6da8..91712e0 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnection.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnection.java
@@ -1096,25 +1096,22 @@ public abstract class ServerConnection implements 
Runnable {
         || this.requestMsg.messageType == MessageType.CLOSE_CONNECTION
         || this.requestMsg.messageType == MessageType.INVALID
         || this.requestMsg.messageType == MessageType.PERIODIC_ACK
-        || this.requestMsg.messageType == 
MessageType.GET_CLIENT_PARTITION_ATTRIBUTES
-       ;
-
-//        || this.requestMsg.messageType == MessageType.GETCQSTATS_MSG_TYPE
-//        || this.requestMsg.messageType == MessageType.GET_CLIENT_PR_METADATA
-//        || this.requestMsg.messageType == MessageType.MAKE_PRIMARY
-//        || this.requestMsg.messageType == MessageType.MONITORCQ_MSG_TYPE
-//        || this.requestMsg.messageType == 
MessageType.REGISTER_DATASERIALIZERS
-//        || this.requestMsg.messageType == MessageType.REGISTER_INSTANTIATORS
-//        || this.requestMsg.messageType == MessageType.ADD_PDX_TYPE
-//        || this.requestMsg.messageType == MessageType.GET_PDX_ID_FOR_TYPE
-//        || this.requestMsg.messageType == MessageType.GET_PDX_TYPE_BY_ID
-//        || this.requestMsg.messageType == MessageType.SIZE
-//        || this.requestMsg.messageType == MessageType.GET_FUNCTION_ATTRIBUTES
-//        || this.requestMsg.messageType == MessageType.ADD_PDX_ENUM
-//        || this.requestMsg.messageType == MessageType.GET_PDX_ID_FOR_ENUM
-//        || this.requestMsg.messageType == MessageType.GET_PDX_ENUM_BY_ID
-//        || this.requestMsg.messageType == MessageType.GET_PDX_TYPES
-//        || this.requestMsg.messageType == MessageType.GET_PDX_ENUMS
+        || this.requestMsg.messageType == 
MessageType.GET_CLIENT_PARTITION_ATTRIBUTES;
+
+    // || this.requestMsg.messageType == MessageType.GETCQSTATS_MSG_TYPE
+    // || this.requestMsg.messageType == MessageType.GET_CLIENT_PR_METADATA
+    // || this.requestMsg.messageType == MessageType.MONITORCQ_MSG_TYPE
+    // || this.requestMsg.messageType == MessageType.REGISTER_DATASERIALIZERS
+    // || this.requestMsg.messageType == MessageType.REGISTER_INSTANTIATORS
+    // || this.requestMsg.messageType == MessageType.ADD_PDX_TYPE
+    // || this.requestMsg.messageType == MessageType.GET_PDX_ID_FOR_TYPE
+    // || this.requestMsg.messageType == MessageType.GET_PDX_TYPE_BY_ID
+    // || this.requestMsg.messageType == MessageType.GET_FUNCTION_ATTRIBUTES
+    // || this.requestMsg.messageType == MessageType.ADD_PDX_ENUM
+    // || this.requestMsg.messageType == MessageType.GET_PDX_ID_FOR_ENUM
+    // || this.requestMsg.messageType == MessageType.GET_PDX_ENUM_BY_ID
+    // || this.requestMsg.messageType == MessageType.GET_PDX_TYPES
+    // || this.requestMsg.messageType == MessageType.GET_PDX_ENUMS
   }
 
   public void run() {
@@ -1722,7 +1719,8 @@ public abstract class ServerConnection implements 
Runnable {
           (HandShake) this.handshake, this.connectionId);
     } else {
       throw new AuthenticationRequiredException(
-          
LocalizedStrings.HandShake_NO_SECURITY_CREDENTIALS_ARE_PROVIDED.toLocalizedString());
+          
LocalizedStrings.HandShake_NO_SECURITY_CREDENTIALS_ARE_PROVIDED.toLocalizedString()
+              + "; for message " + this.requestMsg);
     }
     return uniqueId;
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/793b16f6/geode-core/src/test/java/org/apache/geode/security/ClientAuthenticationTestCase.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/security/ClientAuthenticationTestCase.java
 
b/geode-core/src/test/java/org/apache/geode/security/ClientAuthenticationTestCase.java
index 2221ebc..0ecd72f 100644
--- 
a/geode-core/src/test/java/org/apache/geode/security/ClientAuthenticationTestCase.java
+++ 
b/geode-core/src/test/java/org/apache/geode/security/ClientAuthenticationTestCase.java
@@ -74,7 +74,7 @@ public abstract class ClientAuthenticationTestCase extends 
JUnit4DistributedTest
 
     @Override
     public Class<?>[] getSupportedClasses() {
-      return new Class[]{Color.class};
+      return new Class[] {Color.class};
     }
 
     public int getId() {
@@ -256,7 +256,8 @@ public abstract class ClientAuthenticationTestCase extends 
JUnit4DistributedTest
           DataSerializer.writeObject(new Employee(106l, "David", 
"Copperfield"), outputStream);
           throw new Error("operation should have been rejected");
         } catch (UnsupportedOperationException e) {
-          // "UnsupportedOperationException: Use Pool APIs for doing 
operations when multiuser-secure-mode-enabled is set to true."
+          // "UnsupportedOperationException: Use Pool APIs for doing 
operations when
+          // multiuser-secure-mode-enabled is set to true."
         }
       });
 
@@ -265,10 +266,12 @@ public abstract class ClientAuthenticationTestCase 
extends JUnit4DistributedTest
         EventID eventId = InternalDataSerializer.generateEventId();
         Pool pool = PoolManager.getAll().values().iterator().next();
         try {
-          RegisterDataSerializersOp.execute((ExecutablePool)pool, new 
DataSerializer[]{new MyDataSerializer()}, eventId);
+          RegisterDataSerializersOp.execute((ExecutablePool) pool,
+              new DataSerializer[] {new MyDataSerializer()}, eventId);
           throw new Error("operation should have been rejected");
         } catch (UnsupportedOperationException e) {
-          // "UnsupportedOperationException: Use Pool APIs for doing 
operations when multiuser-secure-mode-enabled is set to true."
+          // "UnsupportedOperationException: Use Pool APIs for doing 
operations when
+          // multiuser-secure-mode-enabled is set to true."
         }
       });
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/793b16f6/geode-core/src/test/java/org/apache/geode/security/ClientAuthorizationTestCase.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/security/ClientAuthorizationTestCase.java
 
b/geode-core/src/test/java/org/apache/geode/security/ClientAuthorizationTestCase.java
index 3910a5a..a4fd365 100644
--- 
a/geode-core/src/test/java/org/apache/geode/security/ClientAuthorizationTestCase.java
+++ 
b/geode-core/src/test/java/org/apache/geode/security/ClientAuthorizationTestCase.java
@@ -288,7 +288,8 @@ public abstract class ClientAuthorizationTestCase extends 
JUnit4DistributedTestC
 
     final int numOps = indices.length;
     System.out.println("Got doOp for op: " + op.toString() + ", numOps: " + 
numOps + ", indices: "
-        + indicesToString(indices) + ", expect: " + expectedResult + " flags: 
" + OpFlags.description(flags));
+        + indicesToString(indices) + ", expect: " + expectedResult + " flags: "
+        + OpFlags.description(flags));
     boolean exceptionOccurred = false;
     boolean breakLoop = false;
 

http://git-wip-us.apache.org/repos/asf/geode/blob/793b16f6/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/VersionManager.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/VersionManager.java
 
b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/VersionManager.java
index 739b690..8eefa01 100755
--- 
a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/VersionManager.java
+++ 
b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/VersionManager.java
@@ -45,8 +45,6 @@ public class VersionManager {
     instance = new VersionManager();
     final String fileName = "geodeOldVersionClasspaths.txt";
     instance.findVersions(fileName);
-    System.out
-        .println("VersionManager has loaded the following classpaths:\n" + 
instance.classPaths);
   }
 
   public static VersionManager getInstance() {

Reply via email to