Skip to content

Commit

Permalink
fix leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Sadanand Shenoy committed Jan 9, 2025
1 parent fb60a03 commit e95a9f1
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1582,8 +1582,8 @@ public void testCreateKeyShouldUseRefreshedBucketReplicationConfig()
Configuration conf = new OzoneConfiguration(cluster.getConf());
conf.set(FS_DEFAULT_NAME_KEY, rootPath);
// Set the number of keys to be processed during batch operate.
try {
OzoneFileSystem o3FS = (OzoneFileSystem) FileSystem.get(conf);
try (FileSystem fileSystem = FileSystem.get(conf)) {
OzoneFileSystem o3FS = (OzoneFileSystem) fileSystem;

//Let's reset the clock to control the time.
((BasicOzoneClientAdapterImpl) (o3FS.getAdapter())).setClock(testClock);
Expand Down Expand Up @@ -1617,8 +1617,6 @@ public void testCreateKeyShouldUseRefreshedBucketReplicationConfig()

createKeyAndAssertKeyType(bucket, o3FS, new Path(rootPath, "key4"),
ReplicationType.RATIS);
} finally {
o3fs.close();
}
}

Expand Down

0 comments on commit e95a9f1

Please sign in to comment.