HDFS-5879. Some TestHftpFileSystem tests do not close streams. Contributed by Gera Shegalov.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1567704 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2014-02-12 18:02:21 +00:00
parent 308f5faf18
commit 5efc9978dd
2 changed files with 5 additions and 0 deletions

View File

@ -416,6 +416,9 @@ Release 2.4.0 - UNRELEASED
HDFS-4858. HDFS DataNode to NameNode RPC should timeout.
(Henry Wang via shv)
HDFS-5879. Some TestHftpFileSystem tests do not close streams.
(Gera Shegalov via suresh)
Release 2.3.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -136,6 +136,7 @@ public class TestHftpFileSystem {
out.close();
FSDataInputStream in = hftpFs.open(p);
assertEquals('0', in.read());
in.close();
// Check the file status matches the path. Hftp returns a FileStatus
// with the entire URI, extract the path part.
@ -250,6 +251,7 @@ public class TestHftpFileSystem {
FSDataInputStream in = hftpFs.open(testFile);
in.seek(7);
assertEquals('7', in.read());
in.close();
}
@Test