From 03cf01614f0543cbea9955f6dc175a0fb1772f26 Mon Sep 17 00:00:00 2001 From: Jonathan Hsieh Date: Wed, 13 Feb 2013 18:22:06 +0000 Subject: [PATCH] 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 --- .../snapshot/TestSnapshotDescriptionUtils.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotDescriptionUtils.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotDescriptionUtils.java index 778bcf0a53a..c93739dba90 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotDescriptionUtils.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestSnapshotDescriptionUtils.java @@ -29,7 +29,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; 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.Type; 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. */ -@Category(SmallTests.class) +@Category(MediumTests.class) public class TestSnapshotDescriptionUtils { private static final HBaseTestingUtility UTIL = new HBaseTestingUtility(); private static FileSystem fs; @@ -57,13 +57,14 @@ public class TestSnapshotDescriptionUtils { @After public void cleanupFS() throws Exception { if (fs.exists(root)) { - if (!fs.delete(root, true)) { - throw new IOException("Failed to delete root test dir: " + root); - } - if (!fs.mkdirs(root)) { - throw new IOException("Failed to create root test dir: " + root); - } + if (!fs.delete(root, true)) { + throw new IOException("Failed to delete root test dir: " + root); + } + if (!fs.mkdirs(root)) { + throw new IOException("Failed to create root test dir: " + root); + } } + EnvironmentEdgeManagerTestHelper.reset(); } private static final Log LOG = LogFactory.getLog(TestSnapshotDescriptionUtils.class);