From 9bc7ecfb9dec6bfe14a12b6d3bfd11392d7752b8 Mon Sep 17 00:00:00 2001 From: tedyu Date: Sat, 16 Jul 2016 16:07:11 -0700 Subject: [PATCH] HBASE-16235 Addendum uses hfile count of 20 (ChiaPing) --- .../cleaner/TestSnapshotFromMaster.java | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java index 4232e17aeaa..1cc9eda7a9c 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestSnapshotFromMaster.java @@ -278,21 +278,9 @@ public class TestSnapshotFromMaster { * should be retained, while those that are not in a snapshot should be deleted. * @throws Exception on failure */ - @Test(timeout = 600000) + @Test(timeout = 300000) public void testSnapshotHFileArchiving() throws Exception { - int[] hfileCount = new int[]{10, 15, 20}; - for (int count : hfileCount) { - LOG.info("testSnapshotHFileArchiving with " + count + " hfiles"); - testSnapshotHFileArchiving(count); - } - } - - /** - * It will put data and flush until there are enough hfiles. - * @param hfileCount - * @throws Exception - */ - private void testSnapshotHFileArchiving(int hfileCount) throws Exception { + int hfileCount = 20; Admin admin = UTIL.getHBaseAdmin(); // make sure we don't fail on listing snapshots SnapshotTestingUtils.assertNoSnapshots(admin); @@ -412,8 +400,8 @@ public class TestSnapshotFromMaster { * @throws IOException on expected failure */ private final Collection getHFiles(Path dir, FileSystem fs, TableName tableName) throws IOException { - Path tableArchive = FSUtils.getTableDir(dir, tableName); - return SnapshotTestingUtils.listHFileNames(fs, tableArchive); + Path tableDir = FSUtils.getTableDir(dir, tableName); + return SnapshotTestingUtils.listHFileNames(fs, tableDir); } /**