You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "fan jingling (Jira)" <ji...@apache.org> on 2019/08/23 02:41:00 UTC

[jira] [Commented] (HBASE-22814) Insufficient set up in TestSecureWALReplay because of test fixture inheritance

    [ https://issues.apache.org/jira/browse/HBASE-22814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913865#comment-16913865 ] 

fan jingling commented on HBASE-22814:
--------------------------------------

thanks for reporting,could u submit a pull request to fix this issue?

> Insufficient set up in TestSecureWALReplay  because of test fixture inheritance
> -------------------------------------------------------------------------------
>
>                 Key: HBASE-22814
>                 URL: https://issues.apache.org/jira/browse/HBASE-22814
>             Project: HBase
>          Issue Type: Test
>          Components: regionserver
>    Affects Versions: 2.1.5
>            Reporter: zi peng
>            Priority: Minor
>              Labels: test
>
> Description: 
> In _TestSecureWALReplay.java,_ it does not call the test fixture method from the base class _TestWALReplay.java_ while the test fixture in the all other sibling test cases do (e.g., _TestWALReplayBoundedLogWriterCreation.java_)
> Suggestion:
> should call *TestWALReplay.setUpBeforeClass()* in @BeforeClass
> or use test utilities to remove dependencies of the tests.
> {code:java}
> public class TestSecureWALReplay extends TestWALReplay {
>     @BeforeClass
>     public static void setUpBeforeClass() throws Exception {
> 	Configuration conf = AbstractTestWALReplay.TEST_UTIL.getConfiguration();
> 	conf.set(HConstants.CRYPTO_KEYPROVIDER_CONF_KEY, KeyProviderForTesting.class.getName());
> 	conf.set(HConstants.CRYPTO_MASTERKEY_NAME_CONF_KEY, "hbase");
> 	conf.setClass("hbase.regionserver.hlog.reader.impl", SecureProtobufLogReader.class,
> 	Reader.class);
> 	conf.setClass("hbase.regionserver.hlog.writer.impl", SecureProtobufLogWriter.class,
> 	Writer.class);
> 	conf.setBoolean(HConstants.ENABLE_WAL_ENCRYPTION, true);
> 	AbstractTestWALReplay.setUpBeforeClass();
>     }
> }{code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)