Skip to content

Commit

Permalink
HDDS-9432. Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
swamirishi committed Oct 18, 2023
1 parent 8dd165a commit 710955e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@
import org.apache.hadoop.ozone.om.helpers.RepeatedOmKeyInfo;
import org.apache.hadoop.ozone.om.helpers.SnapshotInfo;
import org.apache.hadoop.util.Time;
import org.junit.Rule;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.junit.rules.TemporaryFolder;

import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.ozone.om.OMConfigKeys;
Expand All @@ -62,8 +60,8 @@
*/
public class TestOMSnapshotCreateResponse {

@Rule
public TemporaryFolder folder = new TemporaryFolder();
@TempDir
private File folder;

private OMMetadataManager omMetadataManager;
private BatchOperation batchOperation;
Expand All @@ -72,7 +70,7 @@ public class TestOMSnapshotCreateResponse {
@BeforeEach
public void setup() throws Exception {
ozoneConfiguration = new OzoneConfiguration();
String fsPath = folder.newFolder().getAbsolutePath();
String fsPath = folder.getAbsolutePath();
ozoneConfiguration.set(OMConfigKeys.OZONE_OM_DB_DIRS,
fsPath);
omMetadataManager = new OmMetadataManagerImpl(ozoneConfiguration, null);
Expand Down Expand Up @@ -199,8 +197,10 @@ private Set<String> addTestKeysToDeletedTable(String volumeName,
* @param bucketName bucket name
* @return A set of DB keys
*/
private Set<String> addTestKeysToDeletedDirTable(
String volumeName, String bucketName, int numberOfKeys) throws IOException {
private Set<String> addTestKeysToDeletedDirTable(String volumeName,
String bucketName,
int numberOfKeys)
throws IOException {

OMSnapshotResponseTestUtil.addVolumeBucketInfoToTable(
omMetadataManager, volumeName, bucketName);
Expand Down

0 comments on commit 710955e

Please sign in to comment.