zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] eolivelli commented on a change in pull request #1049: ZOOKEEPER-3475 Enable Checkstyle configuration on zookeeper-server
Date Thu, 15 Aug 2019 16:56:17 GMT
eolivelli commented on a change in pull request #1049: ZOOKEEPER-3475 Enable Checkstyle configuration
on zookeeper-server
URL: https://github.com/apache/zookeeper/pull/1049#discussion_r314399707
 
 

 ##########
 File path: zookeeper-server/src/test/java/org/apache/zookeeper/test/SaslTestUtil.java
 ##########
 @@ -21,41 +21,49 @@
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
-
 import org.junit.Assert;
 
 public class SaslTestUtil extends ClientBase {
-  // The maximum time (in milliseconds) a client should take to observe
-  // a disconnect event of the same client from server.
-  static Integer CLIENT_DISCONNECT_TIMEOUT = 3000;
-  static String requireSASLAuthProperty = "zookeeper.sessionRequireClientSASLAuth";
-  static String authProviderProperty = "zookeeper.authProvider.1";
-  static String authProvider = "org.apache.zookeeper.server.auth.SASLAuthenticationProvider";
-  static String digestLoginModule = "org.apache.zookeeper.server.auth.DigestLoginModule";
-  static String jaasConfig = "java.security.auth.login.config";
 
-  static String createJAASConfigFile(String fileName, String password) {
-    String ret = null;
-    try {
-      File tmpDir = createTmpDir();
-      File jaasFile = new File(tmpDir, fileName);
-      FileWriter fwriter = new FileWriter(jaasFile);
-      fwriter.write("" +
-          "Server {\n" +
-          "          " + digestLoginModule + " required\n" +
-          "          user_super=\"test\";\n" +
-          "};\n" +
-          "Client {\n" +
-          "       " + digestLoginModule + " required\n" +
-          "       username=\"super\"\n" +
-          "       password=\"" + password + "\";\n" +
-          "};" + "\n");
-      fwriter.close();
-      ret = jaasFile.getAbsolutePath();
-    } catch (IOException e) {
-      Assert.fail("Unable to create JaaS configuration file!");
+    // The maximum time (in milliseconds) a client should take to observe
+    // a disconnect event of the same client from server.
+    static Integer CLIENT_DISCONNECT_TIMEOUT = 3000;
+    static String requireSASLAuthProperty = "zookeeper.sessionRequireClientSASLAuth";
+    static String authProviderProperty = "zookeeper.authProvider.1";
+    static String authProvider = "org.apache.zookeeper.server.auth.SASLAuthenticationProvider";
+    static String digestLoginModule = "org.apache.zookeeper.server.auth.DigestLoginModule";
+    static String jaasConfig = "java.security.auth.login.config";
+
+    static String createJAASConfigFile(String fileName, String password) {
+        String ret = null;
+        try {
+            File tmpDir = createTmpDir();
+            File jaasFile = new File(tmpDir, fileName);
+            FileWriter fwriter = new FileWriter(jaasFile);
+            fwriter.write(""
+                                  + "Server {\n"
 
 Review comment:
   revert this string

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message