You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/03/05 06:46:26 UTC

[GitHub] [ozone] bshashikant commented on a change in pull request #1981: HDDS-4890. SCM Ratis enable/disable switch

bshashikant commented on a change in pull request #1981:
URL: https://github.com/apache/ozone/pull/1981#discussion_r588067780



##########
File path: hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/block/TestDeletedBlockLog.java
##########
@@ -85,23 +86,24 @@
   private ContainerManagerV2 containerManager;
   private StorageContainerManager scm;
   private List<DatanodeDetails> dnList;
-  private DBTransactionBuffer dbTransactionBuffer;
+  private SCMHADBTransactionBuffer SCMHADBTransactionBuffer;
 
   @Before
   public void setup() throws Exception {
     testDir = GenericTestUtils.getTestDir(
         TestDeletedBlockLog.class.getSimpleName());
     conf = new OzoneConfiguration();
+    conf.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);
     conf.setInt(OZONE_SCM_BLOCK_DELETION_MAX_RETRY, 20);
     conf.set(HddsConfigKeys.OZONE_METADATA_DIRS, testDir.getAbsolutePath());
     scm = TestUtils.getScm(conf);
     containerManager = Mockito.mock(ContainerManagerV2.class);
-    dbTransactionBuffer =
-        new MockDBTransactionBuffer(scm.getScmMetadataStore().getStore());
+    SCMHADBTransactionBuffer =
+        new MockSCMHADBTransactionBuffer(scm.getScmMetadataStore().getStore());

Review comment:
       I think, MockInstances should mimic every functional behaviour of the class. I would prefer to keep it as it is for now. We should be able to test the batch behaviour of SCMHADBTransaction behaviour with this.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org