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:
[email protected]
With regards,
Apache Git Services