HDFS-17443. add null check for fileSys and cluster before shutting down (#6683)

This commit is contained in:
ConfX 2024-03-28 23:09:50 +08:00 committed by GitHub
parent 8528d5783d
commit f3f6340746
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -447,8 +447,12 @@ public void testNameEditsConfigsFailure() throws IOException {
replication, SEED);
checkFile(fileSys, file1, replication);
} finally {
fileSys.close();
cluster.shutdown();
if (fileSys != null) {
fileSys.close();
}
if (cluster != null) {
cluster.shutdown();
}
}
// 2