HBASE-7430 TestSnapshotDescriptionUtils break compaction/scanner tests (EnvironmentEdge issue) (Matteo Bertozzi)
git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-7290@1445799 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3ca47fab92
commit
03cf01614f
|
@ -29,7 +29,7 @@ import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
import org.apache.hadoop.fs.Path;
|
import org.apache.hadoop.fs.Path;
|
||||||
import org.apache.hadoop.hbase.HBaseTestingUtility;
|
import org.apache.hadoop.hbase.HBaseTestingUtility;
|
||||||
import org.apache.hadoop.hbase.SmallTests;
|
import org.apache.hadoop.hbase.MediumTests;
|
||||||
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
|
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
|
||||||
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type;
|
import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription.Type;
|
||||||
import org.apache.hadoop.hbase.util.EnvironmentEdge;
|
import org.apache.hadoop.hbase.util.EnvironmentEdge;
|
||||||
|
@ -42,7 +42,7 @@ import org.junit.experimental.categories.Category;
|
||||||
/**
|
/**
|
||||||
* Test that the {@link SnapshotDescription} helper is helping correctly.
|
* Test that the {@link SnapshotDescription} helper is helping correctly.
|
||||||
*/
|
*/
|
||||||
@Category(SmallTests.class)
|
@Category(MediumTests.class)
|
||||||
public class TestSnapshotDescriptionUtils {
|
public class TestSnapshotDescriptionUtils {
|
||||||
private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
|
private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
|
||||||
private static FileSystem fs;
|
private static FileSystem fs;
|
||||||
|
@ -57,13 +57,14 @@ public class TestSnapshotDescriptionUtils {
|
||||||
@After
|
@After
|
||||||
public void cleanupFS() throws Exception {
|
public void cleanupFS() throws Exception {
|
||||||
if (fs.exists(root)) {
|
if (fs.exists(root)) {
|
||||||
if (!fs.delete(root, true)) {
|
if (!fs.delete(root, true)) {
|
||||||
throw new IOException("Failed to delete root test dir: " + root);
|
throw new IOException("Failed to delete root test dir: " + root);
|
||||||
}
|
}
|
||||||
if (!fs.mkdirs(root)) {
|
if (!fs.mkdirs(root)) {
|
||||||
throw new IOException("Failed to create root test dir: " + root);
|
throw new IOException("Failed to create root test dir: " + root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EnvironmentEdgeManagerTestHelper.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(TestSnapshotDescriptionUtils.class);
|
private static final Log LOG = LogFactory.getLog(TestSnapshotDescriptionUtils.class);
|
||||||
|
|
Loading…
Reference in New Issue