From c1ec92adc996738b9a88dd414418ae15bf0f74d9 Mon Sep 17 00:00:00 2001 From: stack Date: Thu, 30 Oct 2014 19:26:23 -0700 Subject: [PATCH] HBASE-11819 Unit test for CoprocessorHConnection (Talat Uyarer) -- REVERT. Failed in a test run here: https://builds.apache.org/job/PreCommit-HBASE-Build/11530//testReport/ --- .../coprocessor/TestCoprocessorHConnection.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorHConnection.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorHConnection.java index 1b9f1460137..ed95d863c2d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorHConnection.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorHConnection.java @@ -36,14 +36,15 @@ import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.regionserver.HRegion; -import org.apache.hadoop.hbase.MediumTests; +import org.apache.hadoop.hbase.testclassification.CoprocessorTests; +import org.apache.hadoop.hbase.testclassification.MediumTests; import org.apache.hadoop.hbase.util.Bytes; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.experimental.categories.Category; -@Category({MediumTests.class}) +@Category({CoprocessorTests.class, MediumTests.class}) public class TestCoprocessorHConnection { static final Log LOG = LogFactory.getLog(TestCoprocessorHConnection.class); @@ -52,7 +53,7 @@ public class TestCoprocessorHConnection { private static final int ROWSIZE = 20; private static final byte[] rowSeperator1 = Bytes.toBytes(5); private static final byte[] rowSeperator2 = Bytes.toBytes(12); - + private static HBaseTestingUtility util = new HBaseTestingUtility(); private static MiniHBaseCluster cluster = null; @@ -60,7 +61,7 @@ public class TestCoprocessorHConnection { private HRegion region; private ClusterConnection conn; private CoprocessorEnvironment env; - + @Override public void start(CoprocessorEnvironment e) { region = ((RegionCoprocessorEnvironment)e).getRegion(); @@ -70,11 +71,11 @@ public class TestCoprocessorHConnection { public void stop(CoprocessorEnvironment e) { region = null; } - + public byte[] getRegionStartKey() { return region.getStartKey(); } - + public Result getOnCoprocessorHConnection(TableName tableName, byte[] key) throws IOException { conn = CoprocessorHConnection.getConnectionForEnvironment(env); @@ -84,7 +85,7 @@ public class TestCoprocessorHConnection { return result; } } - + @BeforeClass public static void setupBeforeClass() throws Exception { util.startMiniCluster(); @@ -144,7 +145,7 @@ public class TestCoprocessorHConnection { // Find the start key for the region that FooCoprocessor is running on. byte[] regionStartKey = fc.getRegionStartKey(); - + // Get Key Data Get get = new Get(regionStartKey); Result keyData = table.get(get);