You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/02/02 20:56:15 UTC

[GitHub] [hbase] markrmiller opened a new pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

markrmiller opened a new pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116
 
 
   …a common location.
   
   This is causing me issues with parallel test runs.

----------------------------------------------------------------
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

[GitHub] [hbase] ndimiduk commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
ndimiduk commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r376671321
 
 

 ##########
 File path: pom.xml
 ##########
 @@ -729,6 +729,8 @@
             <skip>${surefire.skipFirstPart}</skip>
             <forkCount>${surefire.firstPartForkCount}</forkCount>
             <reuseForks>false</reuseForks>
+            <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+            <tempDir>${surefire.tempDir}</tempDir>
 
 Review comment:
   According to the docs, it can already be overridden via the `tempDir` property. that not working for you?
   http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#tempDir

----------------------------------------------------------------
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

[GitHub] [hbase] saintstack merged pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
saintstack merged pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116
 
 
   

----------------------------------------------------------------
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

[GitHub] [hbase] saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r374273924
 
 

 ##########
 File path: hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestSSLHttpServer.java
 ##########
 @@ -51,62 +52,65 @@
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-      HBaseClassTestRule.forClass(TestSSLHttpServer.class);
+    HBaseClassTestRule.forClass(TestSSLHttpServer.class);
 
   private static final String BASEDIR = System.getProperty("test.build.dir",
-      "target/test-dir") + "/" + TestSSLHttpServer.class.getSimpleName();
+    "target/test-dir") + "/" + TestSSLHttpServer.class.getSimpleName();
 
   private static final Logger LOG = LoggerFactory.getLogger(TestSSLHttpServer.class);
   private static Configuration conf;
   private static HttpServer server;
   private static URL baseUrl;
-  private static String keystoresDir;
+  private static File keystoresDir;
   private static String sslConfDir;
   private static SSLFactory clientSslFactory;
+  private static HBaseCommonTestingUtility htu;
 
 Review comment:
   Statics. normally capitalized as in HTU rather than htu.

----------------------------------------------------------------
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

[GitHub] [hbase] saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r374274553
 
 

 ##########
 File path: hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestSSLHttpServer.java
 ##########
 @@ -51,62 +52,65 @@
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-      HBaseClassTestRule.forClass(TestSSLHttpServer.class);
+    HBaseClassTestRule.forClass(TestSSLHttpServer.class);
 
   private static final String BASEDIR = System.getProperty("test.build.dir",
-      "target/test-dir") + "/" + TestSSLHttpServer.class.getSimpleName();
+    "target/test-dir") + "/" + TestSSLHttpServer.class.getSimpleName();
 
   private static final Logger LOG = LoggerFactory.getLogger(TestSSLHttpServer.class);
   private static Configuration conf;
   private static HttpServer server;
   private static URL baseUrl;
-  private static String keystoresDir;
+  private static File keystoresDir;
   private static String sslConfDir;
   private static SSLFactory clientSslFactory;
+  private static HBaseCommonTestingUtility htu;
 
   @BeforeClass
   public static void setup() throws Exception {
     conf = new Configuration();
     conf.setInt(HttpServer.HTTP_MAX_THREADS, TestHttpServer.MAX_THREADS);
 
-    File base = new File(BASEDIR);
-    FileUtil.fullyDelete(base);
-    base.mkdirs();
-    keystoresDir = new File(BASEDIR).getAbsolutePath();
+    htu = new HBaseCommonTestingUtility(conf);
+
+    keystoresDir = new File(htu.getDataTestDir("keystore").toString());
+    keystoresDir.mkdirs();
+
     sslConfDir = KeyStoreTestUtil.getClasspathDir(TestSSLHttpServer.class);
 
-    KeyStoreTestUtil.setupSSLConfig(keystoresDir, sslConfDir, conf, false);
+    KeyStoreTestUtil.setupSSLConfig(keystoresDir.getAbsolutePath(), sslConfDir, conf, false);
     Configuration sslConf = new Configuration(false);
-    sslConf.addResource("ssl-server.xml");
-    sslConf.addResource("ssl-client.xml");
-
+    sslConf.addResource(conf.get(SSLFactory.SSL_CLIENT_CONF_KEY));
+    conf.addResource(conf.get(SSLFactory.SSL_SERVER_CONF_KEY));
+    sslConf.set(SSLFactory.SSL_CLIENT_CONF_KEY, conf.get(SSLFactory.SSL_CLIENT_CONF_KEY));
+    
     clientSslFactory = new SSLFactory(SSLFactory.Mode.CLIENT, sslConf);
     clientSslFactory.init();
 
     server = new HttpServer.Builder()
-        .setName("test")
-        .addEndpoint(new URI("https://localhost"))
-        .setConf(conf)
-        .keyPassword(HBaseConfiguration.getPassword(sslConf, "ssl.server.keystore.keypassword",
-            null))
-        .keyStore(sslConf.get("ssl.server.keystore.location"),
-            HBaseConfiguration.getPassword(sslConf, "ssl.server.keystore.password", null),
-            sslConf.get("ssl.server.keystore.type", "jks"))
-        .trustStore(sslConf.get("ssl.server.truststore.location"),
-            HBaseConfiguration.getPassword(sslConf, "ssl.server.truststore.password", null),
-            sslConf.get("ssl.server.truststore.type", "jks")).build();
+      .setName("test")
+      .addEndpoint(new URI("https://localhost"))
+      .setConf(conf)
+      .keyPassword(HBaseConfiguration.getPassword(conf, "ssl.server.keystore.keypassword",
 
 Review comment:
   Above its sslconf... you want conf here?

----------------------------------------------------------------
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

[GitHub] [hbase] markrmiller commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
markrmiller commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r376645511
 
 

 ##########
 File path: pom.xml
 ##########
 @@ -729,6 +729,8 @@
             <skip>${surefire.skipFirstPart}</skip>
             <forkCount>${surefire.firstPartForkCount}</forkCount>
             <reuseForks>false</reuseForks>
+            <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+            <tempDir>${surefire.tempDir}</tempDir>
 
 Review comment:
   It was initially just meant to be harmless - it allows you to override via system property but does not yet try to manage tmp dirs internally. I'll file a small follow up issue to look at that. Just wanted fast, safe way to override without patching.

----------------------------------------------------------------
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

[GitHub] [hbase] Apache-HBase commented on issue #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on issue #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#issuecomment-581803117
 
 
   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 26s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  The patch appears to include 6 new or modified test files.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 42s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   5m 49s |  master passed  |
   | +1 :green_heart: |  compile  |   3m 17s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 27s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m  6s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   4m  2s |  master passed  |
   | +0 :ok: |  spotbugs  |   4m 12s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |  20m 58s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 20s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   5m 31s |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m 20s |  the patch passed  |
   | +1 :green_heart: |  javac  |   3m 20s |  the patch passed  |
   | +1 :green_heart: |  checkstyle  |   2m 29s |  root: The patch generated 0 new + 0 unchanged - 4 fixed = 0 total (was 4)  |
   | -1 :x: |  whitespace  |   0m  0s |  The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply  |
   | +1 :green_heart: |  xml  |   0m  1s |  The patch has no ill-formed XML file.  |
   | +1 :green_heart: |  shadedjars  |   5m  2s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  hadoopcheck  |  17m 18s |  Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.  |
   | +1 :green_heart: |  javadoc  |   3m 59s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |  21m 35s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 226m 50s |  root in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   2m  7s |  The patch does not generate ASF License warnings.  |
   |  |   | 339m  1s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/3/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1116 |
   | JIRA Issue | HBASE-23783 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile xml |
   | uname | Linux 8eca1a626def 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1116/out/precommit/personality/provided.sh |
   | git revision | master / bb14bdad62 |
   | Default Java | 1.8.0_181 |
   | whitespace | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/3/artifact/out/whitespace-eol.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/3/testReport/ |
   | Max. process+thread count | 5245 (vs. ulimit of 10000) |
   | modules | C: hbase-common hbase-http hbase-server . U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/3/console |
   | versions | git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   

----------------------------------------------------------------
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

[GitHub] [hbase] markrmiller commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
markrmiller commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r374443660
 
 

 ##########
 File path: hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestSSLHttpServer.java
 ##########
 @@ -51,62 +52,65 @@
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-      HBaseClassTestRule.forClass(TestSSLHttpServer.class);
+    HBaseClassTestRule.forClass(TestSSLHttpServer.class);
 
   private static final String BASEDIR = System.getProperty("test.build.dir",
-      "target/test-dir") + "/" + TestSSLHttpServer.class.getSimpleName();
+    "target/test-dir") + "/" + TestSSLHttpServer.class.getSimpleName();
 
   private static final Logger LOG = LoggerFactory.getLogger(TestSSLHttpServer.class);
   private static Configuration conf;
   private static HttpServer server;
   private static URL baseUrl;
-  private static String keystoresDir;
+  private static File keystoresDir;
   private static String sslConfDir;
   private static SSLFactory clientSslFactory;
+  private static HBaseCommonTestingUtility htu;
 
   @BeforeClass
   public static void setup() throws Exception {
     conf = new Configuration();
     conf.setInt(HttpServer.HTTP_MAX_THREADS, TestHttpServer.MAX_THREADS);
 
-    File base = new File(BASEDIR);
-    FileUtil.fullyDelete(base);
-    base.mkdirs();
-    keystoresDir = new File(BASEDIR).getAbsolutePath();
+    htu = new HBaseCommonTestingUtility(conf);
+
+    keystoresDir = new File(htu.getDataTestDir("keystore").toString());
+    keystoresDir.mkdirs();
+
     sslConfDir = KeyStoreTestUtil.getClasspathDir(TestSSLHttpServer.class);
 
-    KeyStoreTestUtil.setupSSLConfig(keystoresDir, sslConfDir, conf, false);
+    KeyStoreTestUtil.setupSSLConfig(keystoresDir.getAbsolutePath(), sslConfDir, conf, false);
     Configuration sslConf = new Configuration(false);
-    sslConf.addResource("ssl-server.xml");
-    sslConf.addResource("ssl-client.xml");
-
+    sslConf.addResource(conf.get(SSLFactory.SSL_CLIENT_CONF_KEY));
+    conf.addResource(conf.get(SSLFactory.SSL_SERVER_CONF_KEY));
+    sslConf.set(SSLFactory.SSL_CLIENT_CONF_KEY, conf.get(SSLFactory.SSL_CLIENT_CONF_KEY));
+    
     clientSslFactory = new SSLFactory(SSLFactory.Mode.CLIENT, sslConf);
     clientSslFactory.init();
 
     server = new HttpServer.Builder()
-        .setName("test")
-        .addEndpoint(new URI("https://localhost"))
-        .setConf(conf)
-        .keyPassword(HBaseConfiguration.getPassword(sslConf, "ssl.server.keystore.keypassword",
-            null))
-        .keyStore(sslConf.get("ssl.server.keystore.location"),
-            HBaseConfiguration.getPassword(sslConf, "ssl.server.keystore.password", null),
-            sslConf.get("ssl.server.keystore.type", "jks"))
-        .trustStore(sslConf.get("ssl.server.truststore.location"),
-            HBaseConfiguration.getPassword(sslConf, "ssl.server.truststore.password", null),
-            sslConf.get("ssl.server.truststore.type", "jks")).build();
+      .setName("test")
+      .addEndpoint(new URI("https://localhost"))
+      .setConf(conf)
+      .keyPassword(HBaseConfiguration.getPassword(conf, "ssl.server.keystore.keypassword",
 
 Review comment:
   It's more client / server now, tried a rename

----------------------------------------------------------------
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

[GitHub] [hbase] saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r374275731
 
 

 ##########
 File path: hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java
 ##########
 @@ -84,31 +83,29 @@
   private final static String KEYTAB  = "loglevel.keytab";
 
   private static MiniKdc kdc;
-  private static HBaseCommonTestingUtility htu = new HBaseCommonTestingUtility();
 
   private static final String LOCALHOST = "localhost";
   private static final String clientPrincipal = "client/" + LOCALHOST;
   private static String HTTP_PRINCIPAL = "HTTP/" + LOCALHOST;
-
-  private static final File KEYTAB_FILE = new File(
-      htu.getDataTestDir("keytab").toUri().getPath());
+  private static HBaseCommonTestingUtility htu;
 
 Review comment:
   Capitalize

----------------------------------------------------------------
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

[GitHub] [hbase] ndimiduk commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
ndimiduk commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r376602767
 
 

 ##########
 File path: pom.xml
 ##########
 @@ -729,6 +729,8 @@
             <skip>${surefire.skipFirstPart}</skip>
             <forkCount>${surefire.firstPartForkCount}</forkCount>
             <reuseForks>false</reuseForks>
+            <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+            <tempDir>${surefire.tempDir}</tempDir>
 
 Review comment:
   Hey @markrmiller  I don't think this variable is defined anywhere. Missing some other change someplace?

----------------------------------------------------------------
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

[GitHub] [hbase] saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r374274936
 
 

 ##########
 File path: hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestSSLHttpServer.java
 ##########
 @@ -51,62 +52,65 @@
 
   @ClassRule
   public static final HBaseClassTestRule CLASS_RULE =
-      HBaseClassTestRule.forClass(TestSSLHttpServer.class);
+    HBaseClassTestRule.forClass(TestSSLHttpServer.class);
 
   private static final String BASEDIR = System.getProperty("test.build.dir",
-      "target/test-dir") + "/" + TestSSLHttpServer.class.getSimpleName();
+    "target/test-dir") + "/" + TestSSLHttpServer.class.getSimpleName();
 
   private static final Logger LOG = LoggerFactory.getLogger(TestSSLHttpServer.class);
   private static Configuration conf;
   private static HttpServer server;
   private static URL baseUrl;
-  private static String keystoresDir;
+  private static File keystoresDir;
   private static String sslConfDir;
   private static SSLFactory clientSslFactory;
+  private static HBaseCommonTestingUtility htu;
 
   @BeforeClass
   public static void setup() throws Exception {
     conf = new Configuration();
     conf.setInt(HttpServer.HTTP_MAX_THREADS, TestHttpServer.MAX_THREADS);
 
-    File base = new File(BASEDIR);
-    FileUtil.fullyDelete(base);
-    base.mkdirs();
-    keystoresDir = new File(BASEDIR).getAbsolutePath();
+    htu = new HBaseCommonTestingUtility(conf);
+
+    keystoresDir = new File(htu.getDataTestDir("keystore").toString());
+    keystoresDir.mkdirs();
+
     sslConfDir = KeyStoreTestUtil.getClasspathDir(TestSSLHttpServer.class);
 
-    KeyStoreTestUtil.setupSSLConfig(keystoresDir, sslConfDir, conf, false);
+    KeyStoreTestUtil.setupSSLConfig(keystoresDir.getAbsolutePath(), sslConfDir, conf, false);
     Configuration sslConf = new Configuration(false);
-    sslConf.addResource("ssl-server.xml");
-    sslConf.addResource("ssl-client.xml");
-
+    sslConf.addResource(conf.get(SSLFactory.SSL_CLIENT_CONF_KEY));
+    conf.addResource(conf.get(SSLFactory.SSL_SERVER_CONF_KEY));
+    sslConf.set(SSLFactory.SSL_CLIENT_CONF_KEY, conf.get(SSLFactory.SSL_CLIENT_CONF_KEY));
+    
     clientSslFactory = new SSLFactory(SSLFactory.Mode.CLIENT, sslConf);
     clientSslFactory.init();
 
     server = new HttpServer.Builder()
-        .setName("test")
-        .addEndpoint(new URI("https://localhost"))
-        .setConf(conf)
-        .keyPassword(HBaseConfiguration.getPassword(sslConf, "ssl.server.keystore.keypassword",
-            null))
-        .keyStore(sslConf.get("ssl.server.keystore.location"),
-            HBaseConfiguration.getPassword(sslConf, "ssl.server.keystore.password", null),
-            sslConf.get("ssl.server.keystore.type", "jks"))
-        .trustStore(sslConf.get("ssl.server.truststore.location"),
-            HBaseConfiguration.getPassword(sslConf, "ssl.server.truststore.password", null),
-            sslConf.get("ssl.server.truststore.type", "jks")).build();
+      .setName("test")
+      .addEndpoint(new URI("https://localhost"))
+      .setConf(conf)
+      .keyPassword(HBaseConfiguration.getPassword(conf, "ssl.server.keystore.keypassword",
+        null))
+      .keyStore(conf.get("ssl.server.keystore.location"),
 
 Review comment:
   Ditto. We use conf instead of sslconf here... That intentional?

----------------------------------------------------------------
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

[GitHub] [hbase] Apache-HBase commented on issue #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on issue #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#issuecomment-581721533
 
 
   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 34s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  The patch appears to include 6 new or modified test files.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 42s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   5m 43s |  master passed  |
   | +1 :green_heart: |  compile  |   3m 18s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 31s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   5m  3s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   4m  0s |  master passed  |
   | +0 :ok: |  spotbugs  |   4m  4s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |  20m 51s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 19s |  Maven dependency ordering for patch  |
   | -1 :x: |  mvninstall  |   2m 53s |  root in the patch failed.  |
   | -1 :x: |  compile  |   1m 58s |  root in the patch failed.  |
   | -1 :x: |  javac  |   1m 58s |  root in the patch failed.  |
   | +1 :green_heart: |  checkstyle  |   2m 25s |  root: The patch generated 0 new + 0 unchanged - 4 fixed = 0 total (was 4)  |
   | -1 :x: |  whitespace  |   0m  0s |  The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply  |
   | +1 :green_heart: |  xml  |   0m  1s |  The patch has no ill-formed XML file.  |
   | -1 :x: |  shadedjars  |   3m 57s |  patch has 20 errors when building our shaded downstream artifacts.  |
   | -1 :x: |  hadoopcheck  |   2m  9s |  The patch causes 20 errors with Hadoop v2.8.5.  |
   | -1 :x: |  hadoopcheck  |   4m 23s |  The patch causes 20 errors with Hadoop v2.9.2.  |
   | -1 :x: |  hadoopcheck  |   6m 41s |  The patch causes 20 errors with Hadoop v3.1.2.  |
   | +1 :green_heart: |  javadoc  |   3m 56s |  the patch passed  |
   | -1 :x: |  findbugs  |   0m 55s |  hbase-server in the patch failed.  |
   | -1 :x: |  findbugs  |   6m 34s |  root in the patch failed.  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  |  11m 40s |  root in the patch failed.  |
   | +1 :green_heart: |  asflicense  |   0m 45s |  The patch does not generate ASF License warnings.  |
   |  |   |  89m 21s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.4 Server=19.03.4 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1116 |
   | JIRA Issue | HBASE-23783 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile xml |
   | uname | Linux fa3fa27d5d76 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1116/out/precommit/personality/provided.sh |
   | git revision | master / d797ed04e5 |
   | Default Java | 1.8.0_181 |
   | mvninstall | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-mvninstall-root.txt |
   | compile | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-compile-root.txt |
   | javac | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-compile-root.txt |
   | whitespace | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/whitespace-eol.txt |
   | shadedjars | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-shadedjars.txt |
   | hadoopcheck | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-javac-2.8.5.txt |
   | hadoopcheck | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-javac-2.9.2.txt |
   | hadoopcheck | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-javac-3.1.2.txt |
   | findbugs | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-findbugs-hbase-server.txt |
   | findbugs | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-findbugs-root.txt |
   | unit | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/artifact/out/patch-unit-root.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/testReport/ |
   | Max. process+thread count | 289 (vs. ulimit of 10000) |
   | modules | C: hbase-common hbase-http hbase-server . U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/2/console |
   | versions | git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   

----------------------------------------------------------------
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

[GitHub] [hbase] Apache-HBase commented on issue #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on issue #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#issuecomment-581196838
 
 
   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 34s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  The patch appears to include 6 new or modified test files.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 37s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   5m 14s |  master passed  |
   | +1 :green_heart: |  compile  |   1m 44s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 46s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   4m 41s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   1m 16s |  master passed  |
   | +0 :ok: |  spotbugs  |   4m 11s |  Used deprecated FindBugs config; considering switching to SpotBugs.  |
   | +1 :green_heart: |  findbugs  |   5m 34s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 59s |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 43s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m 43s |  the patch passed  |
   | -1 :x: |  checkstyle  |   0m 14s |  hbase-http: The patch generated 8 new + 0 unchanged - 0 fixed = 8 total (was 0)  |
   | -1 :x: |  whitespace  |   0m  0s |  The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply  |
   | +1 :green_heart: |  shadedjars  |   4m 40s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  hadoopcheck  |  15m 42s |  Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.  |
   | +1 :green_heart: |  javadoc  |   1m 16s |  the patch passed  |
   | +1 :green_heart: |  findbugs  |   5m 46s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   3m 19s |  hbase-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   1m 16s |  hbase-http in the patch passed.  |
   | +1 :green_heart: |  unit  | 152m 19s |  hbase-server in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   1m 42s |  The patch does not generate ASF License warnings.  |
   |  |   | 223m 15s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.5 Server=19.03.5 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/1/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/1116 |
   | JIRA Issue | HBASE-23783 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile |
   | uname | Linux 54f0436fe748 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | /home/jenkins/jenkins-slave/workspace/Base-PreCommit-GitHub-PR_PR-1116/out/precommit/personality/provided.sh |
   | git revision | master / 5a3ad6f08f |
   | Default Java | 1.8.0_181 |
   | checkstyle | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/1/artifact/out/diff-checkstyle-hbase-http.txt |
   | whitespace | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/1/artifact/out/whitespace-eol.txt |
   |  Test Results | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/1/testReport/ |
   | Max. process+thread count | 5510 (vs. ulimit of 10000) |
   | modules | C: hbase-common hbase-http hbase-server U: . |
   | Console output | https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-1116/1/console |
   | versions | git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   

----------------------------------------------------------------
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

[GitHub] [hbase] saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #1116: HBASE-23783: Address tests writing and reading SSL/Security files in …
URL: https://github.com/apache/hbase/pull/1116#discussion_r374276429
 
 

 ##########
 File path: hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java
 ##########
 @@ -84,31 +83,29 @@
   private final static String KEYTAB  = "loglevel.keytab";
 
   private static MiniKdc kdc;
-  private static HBaseCommonTestingUtility htu = new HBaseCommonTestingUtility();
 
   private static final String LOCALHOST = "localhost";
   private static final String clientPrincipal = "client/" + LOCALHOST;
   private static String HTTP_PRINCIPAL = "HTTP/" + LOCALHOST;
-
-  private static final File KEYTAB_FILE = new File(
-      htu.getDataTestDir("keytab").toUri().getPath());
+  private static HBaseCommonTestingUtility htu;
+  private static File keyTabFile;
 
   @BeforeClass
   public static void setUp() throws Exception {
-    BASEDIR = new File(htu.getDataTestDir().toUri().getPath());
-
-    FileUtil.fullyDelete(BASEDIR);
-    if (!BASEDIR.mkdirs()) {
-      throw new Exception("unable to create the base directory for testing");
-    }
     serverConf = new Configuration();
+    htu = new HBaseCommonTestingUtility(serverConf);
 
 Review comment:
   And maybe you want to use the HTU's conf. Do HTU.getConfiguration instead of creating a 'new Configuration()' in line above ... and FYI, for configs that will include hbase config, you want HBaseConfiguration.create.... instead of new Configuration.

----------------------------------------------------------------
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