This is an automated email from the ASF dual-hosted git repository. dineshc pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push: new f3f63407468f HDFS-17443. add null check for fileSys and cluster before shutting down (#6683) f3f63407468f is described below commit f3f63407468f69d45945adc4b61e7fb06944ec84 Author: ConfX <114765570+teamco...@users.noreply.github.com> AuthorDate: Thu Mar 28 23:09:50 2024 +0800 HDFS-17443. add null check for fileSys and cluster before shutting down (#6683) --- .../apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java index 7071c661f335..1dc13d1b9d5a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameEditsConfigs.java @@ -447,8 +447,12 @@ public class TestNameEditsConfigs { replication, SEED); checkFile(fileSys, file1, replication); } finally { - fileSys.close(); - cluster.shutdown(); + if (fileSys != null) { + fileSys.close(); + } + if (cluster != null) { + cluster.shutdown(); + } } // 2 --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org