You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "jyotirmoy-gh (via GitHub)" <gi...@apache.org> on 2023/09/13 05:04:35 UTC

[GitHub] [ozone] jyotirmoy-gh opened a new pull request, #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

jyotirmoy-gh opened a new pull request, #5284:
URL: https://github.com/apache/ozone/pull/5284

   ## What changes were proposed in this pull request?
   
   Added unit-testcase for Snapshot Quota handling - `TestOmSnapshot#testSnapshotQuotaHandling
   `
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-9269
   
   ## How was this patch tested?
   
   Testcase file - `hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java`
   ```
    mvn -l testlog.out -Dtest=TestOmSnapshot#testSnapshotQuotaHandling test
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.hadoop.ozone.om.TestOmSnapshot
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 493.689 s - in org.apache.hadoop.ozone.om.TestOmSnapshot
   [INFO]
   [INFO] Results:
   [INFO]
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
   [INFO]
   ```
   


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


[GitHub] [ozone] jyotirmoy-gh commented on a diff in pull request #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

Posted by "jyotirmoy-gh (via GitHub)" <gi...@apache.org>.
jyotirmoy-gh commented on code in PR #5284:
URL: https://github.com/apache/ozone/pull/5284#discussion_r1324251553


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,46 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getUsedNamespace();

Review Comment:
   Changed variable name



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,46 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getUsedNamespace();
+    long buckNameQuotaBefore = bucket1.getUsedNamespace();

Review Comment:
   Changed variable name



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


[GitHub] [ozone] jyotirmoy-gh commented on a diff in pull request #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

Posted by "jyotirmoy-gh (via GitHub)" <gi...@apache.org>.
jyotirmoy-gh commented on code in PR #5284:
URL: https://github.com/apache/ozone/pull/5284#discussion_r1324254265


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,46 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getUsedNamespace();
+    long buckNameQuotaBefore = bucket1.getUsedNamespace();
+    long buckSpaceQuotaBefore = bucket1.getUsedBytes();
+
+    String snap1 = "snap" + counter.incrementAndGet();
+    createSnapshot(volume, bucket, snap1);
+
+    long volNameQuotaAfter = volume1.getUsedNamespace();
+    long buckNameQuotaAfter = bucket1.getUsedNamespace();
+    long buckSpaceQuotaAfter = bucket1.getUsedBytes();
+
+    assertEquals(volNameQuotaBefore, volNameQuotaAfter);
+    assertEquals(buckNameQuotaBefore, buckNameQuotaAfter);
+    assertEquals(buckSpaceQuotaBefore, buckSpaceQuotaAfter);
+
+    store.deleteSnapshot(volume, bucket, snap1);
+
+    long volNameQuotaFinal = volume1.getUsedNamespace();
+    long buckNameQuotaFinal = bucket1.getUsedNamespace();
+    long buckSpaceQuotaFinal = bucket1.getUsedBytes();
+
+    assertEquals(volNameQuotaBefore, volNameQuotaFinal);
+    assertEquals(buckNameQuotaBefore, buckNameQuotaFinal);
+    assertEquals(buckSpaceQuotaBefore, buckSpaceQuotaFinal);

Review Comment:
   Added delete scenario 



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


[GitHub] [ozone] sadanand48 commented on a diff in pull request #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #5284:
URL: https://github.com/apache/ozone/pull/5284#discussion_r1324073599


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,46 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getUsedNamespace();

Review Comment:
   volUsedNamespace



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,46 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getUsedNamespace();
+    long buckNameQuotaBefore = bucket1.getUsedNamespace();

Review Comment:
   buckUsedNamespace/buckNamespace



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,46 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getUsedNamespace();
+    long buckNameQuotaBefore = bucket1.getUsedNamespace();
+    long buckSpaceQuotaBefore = bucket1.getUsedBytes();

Review Comment:
   buckUsedBytes/buckSpace



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,46 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getUsedNamespace();
+    long buckNameQuotaBefore = bucket1.getUsedNamespace();
+    long buckSpaceQuotaBefore = bucket1.getUsedBytes();
+
+    String snap1 = "snap" + counter.incrementAndGet();
+    createSnapshot(volume, bucket, snap1);
+
+    long volNameQuotaAfter = volume1.getUsedNamespace();
+    long buckNameQuotaAfter = bucket1.getUsedNamespace();
+    long buckSpaceQuotaAfter = bucket1.getUsedBytes();
+
+    assertEquals(volNameQuotaBefore, volNameQuotaAfter);
+    assertEquals(buckNameQuotaBefore, buckNameQuotaAfter);
+    assertEquals(buckSpaceQuotaBefore, buckSpaceQuotaAfter);
+
+    store.deleteSnapshot(volume, bucket, snap1);
+
+    long volNameQuotaFinal = volume1.getUsedNamespace();
+    long buckNameQuotaFinal = bucket1.getUsedNamespace();
+    long buckSpaceQuotaFinal = bucket1.getUsedBytes();
+
+    assertEquals(volNameQuotaBefore, volNameQuotaFinal);
+    assertEquals(buckNameQuotaBefore, buckNameQuotaFinal);
+    assertEquals(buckSpaceQuotaBefore, buckSpaceQuotaFinal);

Review Comment:
   maybe add a case where key is deleted after taking a snapshot



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


[GitHub] [ozone] jyotirmoy-gh commented on a diff in pull request #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

Posted by "jyotirmoy-gh (via GitHub)" <gi...@apache.org>.
jyotirmoy-gh commented on code in PR #5284:
URL: https://github.com/apache/ozone/pull/5284#discussion_r1324252022


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,46 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getUsedNamespace();
+    long buckNameQuotaBefore = bucket1.getUsedNamespace();
+    long buckSpaceQuotaBefore = bucket1.getUsedBytes();

Review Comment:
   Changed variable name



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


[GitHub] [ozone] sadanand48 merged pull request #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 merged PR #5284:
URL: https://github.com/apache/ozone/pull/5284


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


[GitHub] [ozone] sadanand48 commented on a diff in pull request #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #5284:
URL: https://github.com/apache/ozone/pull/5284#discussion_r1324036677


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,51 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getQuotaInNamespace();
+    long volSpaceQuotaBefore = volume1.getQuotaInBytes();
+    long buckNameQuotaBefore = bucket1.getQuotaInNamespace();
+    long buckSpaceQuotaBefore = bucket1.getQuotaInBytes();
+
+    String snap1 = "snap" + counter.incrementAndGet();
+    createSnapshot(volume, bucket, snap1);
+
+    long volNameQuotaAfter = volume1.getQuotaInNamespace();
+    long volSpaceQuotaAfter = volume1.getQuotaInBytes();
+    long buckNameQuotaAfter = bucket1.getQuotaInNamespace();
+    long buckSpaceQuotaAfter = bucket1.getQuotaInBytes();
+
+    assertEquals(volNameQuotaBefore, volNameQuotaAfter);
+    assertEquals(volSpaceQuotaBefore, volSpaceQuotaAfter);
+    assertEquals(buckNameQuotaBefore, buckNameQuotaAfter);
+    assertEquals(buckSpaceQuotaBefore, buckSpaceQuotaAfter);
+
+    store.deleteSnapshot(volume, bucket, snap1);
+
+    long volNameQuotaFinal = volume1.getQuotaInNamespace();
+    long volSpaceQuotaFinal = volume1.getQuotaInBytes();
+    long buckNameQuotaFinal = bucket1.getQuotaInNamespace();
+    long buckSpaceQuotaFinal = bucket1.getQuotaInBytes();
+
+    assertEquals(volNameQuotaBefore, volNameQuotaFinal);

Review Comment:
   The Quota set on the bucket/volume doesn't change on taking /deleting a snapshot, we can do an assert for bucket.getUsedBytes() before and after these operations.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


[GitHub] [ozone] jyotirmoy-gh commented on pull request #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

Posted by "jyotirmoy-gh (via GitHub)" <gi...@apache.org>.
jyotirmoy-gh commented on PR #5284:
URL: https://github.com/apache/ozone/pull/5284#issuecomment-1717029069

   @sadanand48 @sumitagrawl @smengcl @nilotpalnandi - Please review


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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


[GitHub] [ozone] jyotirmoy-gh commented on a diff in pull request #5284: HDDS-9269. [snapshot] Add unit-testcase for Snapshot Quota handling

Posted by "jyotirmoy-gh (via GitHub)" <gi...@apache.org>.
jyotirmoy-gh commented on code in PR #5284:
URL: https://github.com/apache/ozone/pull/5284#discussion_r1324062403


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -1786,6 +1787,51 @@ public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
             () -> store.deleteSnapshot(nullstr, bucket, snap1));
   }
 
+  @Test
+  public void testSnapshotQuotaHandling() throws Exception {
+    String volume = "vol-" + counter.incrementAndGet();
+    String bucket = "buck-" + counter.incrementAndGet();
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    bucket1.setQuota(OzoneQuota.parseQuota("102400000", "500"));
+    volume1.setQuota(OzoneQuota.parseQuota("204800000", "1000"));
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKeyWithPrefix(bucket1, key1);
+
+    long volNameQuotaBefore = volume1.getQuotaInNamespace();
+    long volSpaceQuotaBefore = volume1.getQuotaInBytes();
+    long buckNameQuotaBefore = bucket1.getQuotaInNamespace();
+    long buckSpaceQuotaBefore = bucket1.getQuotaInBytes();
+
+    String snap1 = "snap" + counter.incrementAndGet();
+    createSnapshot(volume, bucket, snap1);
+
+    long volNameQuotaAfter = volume1.getQuotaInNamespace();
+    long volSpaceQuotaAfter = volume1.getQuotaInBytes();
+    long buckNameQuotaAfter = bucket1.getQuotaInNamespace();
+    long buckSpaceQuotaAfter = bucket1.getQuotaInBytes();
+
+    assertEquals(volNameQuotaBefore, volNameQuotaAfter);
+    assertEquals(volSpaceQuotaBefore, volSpaceQuotaAfter);
+    assertEquals(buckNameQuotaBefore, buckNameQuotaAfter);
+    assertEquals(buckSpaceQuotaBefore, buckSpaceQuotaAfter);
+
+    store.deleteSnapshot(volume, bucket, snap1);
+
+    long volNameQuotaFinal = volume1.getQuotaInNamespace();
+    long volSpaceQuotaFinal = volume1.getQuotaInBytes();
+    long buckNameQuotaFinal = bucket1.getQuotaInNamespace();
+    long buckSpaceQuotaFinal = bucket1.getQuotaInBytes();
+
+    assertEquals(volNameQuotaBefore, volNameQuotaFinal);

Review Comment:
   Added checks for getUsedBytes and getUsedNamespace for volume and bucket.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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