hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject hbase git commit: HBASE-14915 Hanging test : org.apache.hadoop.hbase.mapreduce.TestImportExport (Heng Chen)
Date Fri, 17 Jun 2016 19:37:24 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 1f37cdfb4 -> 3723baefe


HBASE-14915 Hanging test : org.apache.hadoop.hbase.mapreduce.TestImportExport (Heng Chen)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3723baef
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3723baef
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3723baef

Branch: refs/heads/branch-1
Commit: 3723baefe35035d4692cf902d026156341924d98
Parents: 1f37cdf
Author: chenheng <chenheng@apache.org>
Authored: Sat Dec 12 11:28:14 2015 +0800
Committer: Mikhail Antonov <antonov@apache.org>
Committed: Fri Jun 17 12:35:36 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/mapreduce/TestImportExport.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3723baef/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
index e2131e9..1ed99e5 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java
@@ -43,6 +43,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
+import org.apache.hadoop.hbase.CategoryBasedTimeout;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HRegionInfo;
@@ -78,8 +79,10 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.rules.TestRule;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
@@ -104,9 +107,14 @@ public class TestImportExport {
 
   private static long now = System.currentTimeMillis();
 
+  @Rule
+  public final TestRule timeout = CategoryBasedTimeout.builder().withTimeout(this.getClass()).
+          withLookingForStuckThread(true).build();
+
   @BeforeClass
   public static void beforeClass() throws Exception {
     // Up the handlers; this test needs more than usual.
+    UTIL.getConfiguration().setBoolean(HBaseTestingUtility.USE_LOCAL_FILESYSTEM, true);
     UTIL.getConfiguration().setInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT,
10);
     UTIL.setJobWithoutMRCluster();
     UTIL.startMiniCluster();
@@ -376,7 +384,7 @@ public class TestImportExport {
     HTable exportT = new HTable(UTIL.getConfiguration(), EXPORT_TABLE);
       //Add first version of QUAL
       Put p = new Put(ROW1);
-      p.add(FAMILYA, QUAL, now, QUAL);
+    p.add(FAMILYA, QUAL, now, QUAL);
       exportT.put(p);
 
       //Add Delete family marker
@@ -385,7 +393,7 @@ public class TestImportExport {
 
     //Add second version of QUAL
     p = new Put(ROW1);
-    p.add(FAMILYA, QUAL, now+5, "s".getBytes());
+    p.add(FAMILYA, QUAL, now + 5, "s".getBytes());
     exportT.put(p);
 
     //Add second Delete family marker


Mime
View raw message