Skip to content

Commit 8931393

Browse files
authored
HDFS-17133: TestFsDatasetImpl missing null check when cleaning up (#6079). Contributed by ConfX.
Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
1 parent 390cd29 commit 8931393

File tree

1 file changed

+2
-2
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl

1 file changed

+2
-2
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ private void testMoveBlockFailure(Configuration config) {
11731173
LOG.info("Exception in testMoveBlockFailure ", ex);
11741174
fail("Exception while testing testMoveBlockFailure ");
11751175
} finally {
1176-
if (cluster.isClusterUp()) {
1176+
if (cluster != null && cluster.isClusterUp()) {
11771177
cluster.shutdown();
11781178
}
11791179
}
@@ -1984,4 +1984,4 @@ public void tesInvalidateMissingBlock() throws Exception {
19841984
cluster.shutdown();
19851985
}
19861986
}
1987-
}
1987+
}

0 commit comments

Comments
 (0)