You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockScanner.java
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,7 @@ public void close() throws IOException {
125
125
if (cluster != null) {
126
126
for (inti = 0; i < numNameServices; i++) {
127
127
dfs[i].delete(newPath("/test"), true);
128
+
dfs[i].close();
128
129
}
129
130
cluster.shutdown();
130
131
}
@@ -817,6 +818,7 @@ public Boolean get() {
817
818
"in recentSuspectBlocks.", info.goodBlocks.contains(first));
818
819
info.blocksScanned = 0;
819
820
}
821
+
ctx.close();
820
822
}
821
823
822
824
/**
@@ -873,6 +875,7 @@ public Boolean get() {
873
875
info.blocksScanned = 0;
874
876
}
875
877
info.sem.release(1);
878
+
ctx.close();
876
879
}
877
880
878
881
/**
@@ -933,12 +936,12 @@ public void testAppendWhileScanning() throws Exception {
933
936
os.write(bytes);
934
937
os.hflush();
935
938
os.close();
936
-
fs.close();
937
939
938
940
// verify that volume scanner does not find bad blocks after append.
0 commit comments