From 09ca6193890e8caffeb2951340b6a6fc10b5cfa0 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Thu, 3 May 2018 12:26:12 -0700 Subject: [PATCH] HBASE-20507 Do not need to call recoverLease on the broken file when we fail to create a wal writer --- .../hbase/io/asyncfs/TestOverwriteFileUnderConstruction.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/asyncfs/TestOverwriteFileUnderConstruction.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/asyncfs/TestOverwriteFileUnderConstruction.java index 7f75fdb2680..aaeed1523f7 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/asyncfs/TestOverwriteFileUnderConstruction.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/asyncfs/TestOverwriteFileUnderConstruction.java @@ -22,6 +22,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import static org.junit.Assert.fail; +import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; @@ -95,6 +96,8 @@ public class TestOverwriteFileUnderConstruction { out1.close(); // a successful close is also OK for us so no assertion here, we just need to confirm that the // data in the file are correct. + } catch (FileNotFoundException fnfe) { + // hadoop3 throws one of these. } catch (RemoteException e) { // expected assertThat(e.unwrapRemoteException(), instanceOf(LeaseExpiredException.class));