HDFS-8847. change TestHDFSContractAppend to not override testRenameFileBeingAppended method. Contributed by Zhihai Xu
This commit is contained in:
parent
a628a6f126
commit
90b510405a
|
@ -1106,6 +1106,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-8670. Better to exclude decommissioned nodes for namenode NodeUsage JMX
|
HDFS-8670. Better to exclude decommissioned nodes for namenode NodeUsage JMX
|
||||||
(J.Andreina via vinayakumarb)
|
(J.Andreina via vinayakumarb)
|
||||||
|
|
||||||
|
HDFS-8847. change TestHDFSContractAppend to not override
|
||||||
|
testRenameFileBeingAppended method. (Zhihai Xu)
|
||||||
|
|
||||||
Release 2.7.2 - UNRELEASED
|
Release 2.7.2 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -17,11 +17,9 @@ package org.apache.hadoop.fs.contract.hdfs;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.contract.AbstractContractAppendTest;
|
import org.apache.hadoop.fs.contract.AbstractContractAppendTest;
|
||||||
import org.apache.hadoop.fs.contract.AbstractFSContract;
|
import org.apache.hadoop.fs.contract.AbstractFSContract;
|
||||||
import org.apache.hadoop.fs.contract.ContractTestUtils;
|
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class TestHDFSContractAppend extends AbstractContractAppendTest {
|
public class TestHDFSContractAppend extends AbstractContractAppendTest {
|
||||||
|
@ -40,17 +38,4 @@ public class TestHDFSContractAppend extends AbstractContractAppendTest {
|
||||||
protected AbstractFSContract createContract(Configuration conf) {
|
protected AbstractFSContract createContract(Configuration conf) {
|
||||||
return new HDFSContract(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);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue