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/

This commit is contained in:
stack 2014-10-30 19:26:23 -07:00
parent 49fb89f151
commit c1ec92adc9
1 changed files with 9 additions and 8 deletions

View File

@ -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);