HBASE-20507 Do not need to call recoverLease on the broken file when we fail to create a wal writer

This commit is contained in:
Michael Stack 2018-05-03 12:26:12 -07:00
parent 4cb444e77b
commit 09ca619389
No known key found for this signature in database
GPG Key ID: 9816C7FC8ACC93D2
1 changed files with 3 additions and 0 deletions

View File

@ -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));