Skip to content

Commit 7e1a69d

Browse files
committed
HBASE-28448 CompressionTest hangs when run over a Ozone ofs path (apache#5771)
This bug was found via HDDS-10564. (cherry picked from commit adc79a0) (cherry picked from commit 0aaf372)
1 parent 9f60f18 commit 7e1a69d

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

hbase-server/src/main/java/org/apache/hadoop/hbase/util/CompressionTest.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,18 @@ public static void main(String[] args) throws Exception {
146146

147147
Configuration conf = new Configuration();
148148
Path path = new Path(args[0]);
149-
FileSystem fs = path.getFileSystem(conf);
150-
if (fs.exists(path)) {
151-
System.err.println("The specified path exists, aborting!");
152-
System.exit(1);
153-
}
149+
try (FileSystem fs = path.getFileSystem(conf)) {
150+
if (fs.exists(path)) {
151+
System.err.println("The specified path exists, aborting!");
152+
System.exit(1);
153+
}
154154

155-
try {
156-
doSmokeTest(fs, path, args[1]);
157-
} finally {
158-
fs.delete(path, false);
155+
try {
156+
doSmokeTest(fs, path, args[1]);
157+
} finally {
158+
fs.delete(path, false);
159+
}
160+
System.out.println("SUCCESS");
159161
}
160-
System.out.println("SUCCESS");
161162
}
162163
}

0 commit comments

Comments
 (0)