HDFS-2043. TestHFlush failing intermittently. Contributed by Lin Yiqun.

This commit is contained in:
Masatake Iwasaki 2016-05-06 15:36:47 +09:00
parent 8d48266720
commit 2835f146b5

View File

@ -485,8 +485,14 @@ public void testHFlushInterrupted() throws Exception {
// If we got the exception, we shouldn't have interrupted status anymore. // If we got the exception, we shouldn't have interrupted status anymore.
assertFalse(Thread.interrupted()); assertFalse(Thread.interrupted());
// Do the try-catch in the second stm.close() avoid that streamer was already
// closed in other places.
try {
// Now do a successful close. // Now do a successful close.
stm.close(); stm.close();
} catch (IOException e) {
System.out.println("Got expected exception during second close");
}
} }