You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by si...@apache.org on 2023/02/28 20:19:31 UTC

[ozone] branch revert-4297-HDDS-8006 created (now 8e73149576)

This is an automated email from the ASF dual-hosted git repository.

siyao pushed a change to branch revert-4297-HDDS-8006
in repository https://gitbox.apache.org/repos/asf/ozone.git


      at 8e73149576 Revert "HDDS-8006. [snapshot] Add unit test cases for snapshot delete (#4297)"

This branch includes the following new commits:

     new 8e73149576 Revert "HDDS-8006. [snapshot] Add unit test cases for snapshot delete (#4297)"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[ozone] 01/01: Revert "HDDS-8006. [snapshot] Add unit test cases for snapshot delete (#4297)"

Posted by si...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

siyao pushed a commit to branch revert-4297-HDDS-8006
in repository https://gitbox.apache.org/repos/asf/ozone.git

commit 8e73149576471e8790da16830df490d96444747e
Author: Siyao Meng <50...@users.noreply.github.com>
AuthorDate: Tue Feb 28 12:19:17 2023 -0800

    Revert "HDDS-8006. [snapshot] Add unit test cases for snapshot delete (#4297)"
    
    This reverts commit 0349c8e8a9b5a6df50fb525e60e6c33e772f116f.
---
 .../org/apache/hadoop/ozone/om/TestOmSnapshot.java | 94 ----------------------
 1 file changed, 94 deletions(-)

diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java
index b153c8d241..c8983df3fe 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java
@@ -413,29 +413,6 @@ public class TestOmSnapshot {
             () -> createSnapshot(volume, bucket));
   }
 
-  @Test
-  public void testCreateSnapshotMissingMandatoryParams() throws Exception {
-    String volume = "vol-" + RandomStringUtils.randomNumeric(5);
-    String bucket = "buck-" + RandomStringUtils.randomNumeric(5);
-    store.createVolume(volume);
-    OzoneVolume volume1 = store.getVolume(volume);
-    volume1.createBucket(bucket);
-    OzoneBucket bucket1 = volume1.getBucket(bucket);
-    // Create Key1 and take snapshot
-    String key1 = "key-1-";
-    createFileKey(bucket1, key1);
-    String snap1 = "snap" + RandomStringUtils.randomNumeric(5);
-    createSnapshot(volume, bucket, snap1);
-
-    String nullstr = "";
-    // Bucket is empty
-    assertThrows(IllegalArgumentException.class,
-            () -> createSnapshot(volume, nullstr));
-    // Volume is empty
-    assertThrows(IllegalArgumentException.class,
-            () -> createSnapshot(nullstr, bucket));
-  }
-
   @Test
   public void testBucketDeleteIfSnapshotExists() throws Exception {
     String volume1 = "vol-" + RandomStringUtils.randomNumeric(5);
@@ -660,77 +637,6 @@ public class TestOmSnapshot {
     Assert.assertEquals(1, diff1.getDiffList().size());
   }
 
-  @Test
-  public void testDeleteSnapshotTwice() throws Exception {
-    String volume = "vol-" + RandomStringUtils.randomNumeric(5);
-    String bucket = "buck-" + RandomStringUtils.randomNumeric(5);
-    store.createVolume(volume);
-    OzoneVolume volume1 = store.getVolume(volume);
-    volume1.createBucket(bucket);
-    OzoneBucket bucket1 = volume1.getBucket(bucket);
-    // Create Key1 and take snapshot
-    String key1 = "key-1-";
-    createFileKey(bucket1, key1);
-    String snap1 = "snap" + RandomStringUtils.randomNumeric(5);
-    createSnapshot(volume, bucket, snap1);
-    store.deleteSnapshot(volume, bucket, snap1);
-
-    LambdaTestUtils.intercept(OMException.class,
-                "FILE_NOT_FOUND",
-                () -> store.deleteSnapshot(volume, bucket, snap1));
-
-  }
-
-  @Test
-  public void testDeleteSnapshotFailure() throws Exception {
-    String volume = "vol-" + RandomStringUtils.randomNumeric(5);
-    String bucket = "buck-" + RandomStringUtils.randomNumeric(5);
-    store.createVolume(volume);
-    OzoneVolume volume1 = store.getVolume(volume);
-    volume1.createBucket(bucket);
-    OzoneBucket bucket1 = volume1.getBucket(bucket);
-    // Create Key1 and take snapshot
-    String key1 = "key-1-";
-    createFileKey(bucket1, key1);
-    String snap1 = "snap" + RandomStringUtils.randomNumeric(5);
-    createSnapshot(volume, bucket, snap1);
-
-    // Delete non-existent snapshot
-    LambdaTestUtils.intercept(OMException.class,
-                "FILE_NOT_FOUND",
-                () -> store.deleteSnapshot(volume, bucket, "snapnonexistent"));
-
-    // Delete snapshot with non-existent url
-    LambdaTestUtils.intercept(OMException.class,
-                 "BUCKET_NOT_FOUND",
-                () -> store.deleteSnapshot(volume, "nonexistentbucket", snap1));
-  }
-
-  @Test
-  public void testDeleteSnapshotMissingMandatoryParams() throws Exception {
-    String volume = "vol-" + RandomStringUtils.randomNumeric(5);
-    String bucket = "buck-" + RandomStringUtils.randomNumeric(5);
-    store.createVolume(volume);
-    OzoneVolume volume1 = store.getVolume(volume);
-    volume1.createBucket(bucket);
-    OzoneBucket bucket1 = volume1.getBucket(bucket);
-    // Create Key1 and take snapshot
-    String key1 = "key-1-";
-    createFileKey(bucket1, key1);
-    String snap1 = "snap" + RandomStringUtils.randomNumeric(5);
-    createSnapshot(volume, bucket, snap1);
-    String nullstr = "";
-    // Snapshot is empty
-    assertThrows(IllegalArgumentException.class,
-            () -> store.deleteSnapshot(volume, bucket, nullstr));
-    // Bucket is empty
-    assertThrows(IllegalArgumentException.class,
-            () -> store.deleteSnapshot(volume, nullstr, snap1));
-    // Volume is empty
-    assertThrows(IllegalArgumentException.class,
-            () -> store.deleteSnapshot(nullstr, bucket, snap1));
-  }
-
   @NotNull
   private static List<LiveFileMetaData> getKeyTableSstFiles() {
     if (!bucketLayout.isFileSystemOptimized()) {


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