From c6e79178d43e77e9e175aa8049d88672f5715862 Mon Sep 17 00:00:00 2001 From: Zhihai Xu Date: Fri, 31 Jul 2015 21:40:43 -0700 Subject: [PATCH] HDFS-8847. change TestHDFSContractAppend to not override testRenameFileBeingAppended method. Contributed by Zhihai Xu (cherry picked from commit 90b510405af5ac9d4947c4201065b64994f7ef63) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../fs/contract/hdfs/TestHDFSContractAppend.java | 15 --------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 87d82bc6724..f03fb212fff 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -764,6 +764,9 @@ Release 2.8.0 - UNRELEASED HDFS-8670. Better to exclude decommissioned nodes for namenode NodeUsage JMX (J.Andreina via vinayakumarb) + HDFS-8847. change TestHDFSContractAppend to not override + testRenameFileBeingAppended method. (Zhihai Xu) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/contract/hdfs/TestHDFSContractAppend.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/contract/hdfs/TestHDFSContractAppend.java index c9148e10de4..897354c1386 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/contract/hdfs/TestHDFSContractAppend.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/contract/hdfs/TestHDFSContractAppend.java @@ -17,11 +17,9 @@ package org.apache.hadoop.fs.contract.hdfs; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.contract.AbstractContractAppendTest; import org.apache.hadoop.fs.contract.AbstractFSContract; -import org.apache.hadoop.fs.contract.ContractTestUtils; import org.junit.AfterClass; import org.junit.BeforeClass; -import java.io.FileNotFoundException; import java.io.IOException; public class TestHDFSContractAppend extends AbstractContractAppendTest { @@ -40,17 +38,4 @@ public class TestHDFSContractAppend extends AbstractContractAppendTest { protected AbstractFSContract createContract(Configuration conf) { return new HDFSContract(conf); } - - @Override - public void testRenameFileBeingAppended() throws Throwable { - try { - super.testRenameFileBeingAppended(); - fail("Expected a FileNotFoundException"); - } catch (FileNotFoundException e) { - // downgrade - ContractTestUtils.downgrade("Renaming an open file" + - "still creates the old path", e); - - } - } }