Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-22814

Insufficient set up in TestSecureWALReplay because of test fixture inheritance

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.5
    • Fix Version/s: None
    • Component/s: regionserver
    • Labels:

      Description

      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.

      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();
          }
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zhouyapengzi zi peng
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: