HBASE-13414 Removes now-obselete checks for JRE 6 in TestHCM.
This commit is contained in:
parent
8cd3001f81
commit
cbc53a0ba5
|
@ -69,7 +69,6 @@ import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
||||||
import org.apache.hadoop.hbase.util.JVMClusterUtil;
|
import org.apache.hadoop.hbase.util.JVMClusterUtil;
|
||||||
import org.apache.hadoop.hbase.util.ManualEnvironmentEdge;
|
import org.apache.hadoop.hbase.util.ManualEnvironmentEdge;
|
||||||
import org.apache.hadoop.hbase.util.Threads;
|
import org.apache.hadoop.hbase.util.Threads;
|
||||||
import org.jboss.netty.util.internal.DetectionUtil;
|
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
|
@ -101,8 +100,6 @@ public class TestHCM {
|
||||||
private static final byte[] ROW_X = Bytes.toBytes("xxx");
|
private static final byte[] ROW_X = Bytes.toBytes("xxx");
|
||||||
private static Random _randy = new Random();
|
private static Random _randy = new Random();
|
||||||
|
|
||||||
private static boolean isJavaOk = DetectionUtil.javaVersion() > 6;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This copro sleeps 20 second. The first call it fails. The second time, it works.
|
* This copro sleeps 20 second. The first call it fails. The second time, it works.
|
||||||
*/
|
*/
|
||||||
|
@ -124,11 +121,7 @@ public class TestHCM {
|
||||||
|
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void setUpBeforeClass() throws Exception {
|
public static void setUpBeforeClass() throws Exception {
|
||||||
TEST_UTIL.getConfiguration().setBoolean(HConstants.STATUS_PUBLISHED,
|
TEST_UTIL.getConfiguration().setBoolean(HConstants.STATUS_PUBLISHED, true);
|
||||||
HConstants.STATUS_PUBLISHED_DEFAULT);
|
|
||||||
if (isJavaOk) {
|
|
||||||
TEST_UTIL.getConfiguration().setBoolean(HConstants.STATUS_PUBLISHED, true);
|
|
||||||
}
|
|
||||||
TEST_UTIL.startMiniCluster(2);
|
TEST_UTIL.startMiniCluster(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,10 +204,6 @@ public class TestHCM {
|
||||||
// Fails too often! Needs work. HBASE-12558
|
// Fails too often! Needs work. HBASE-12558
|
||||||
@Ignore @Test(expected = RegionServerStoppedException.class)
|
@Ignore @Test(expected = RegionServerStoppedException.class)
|
||||||
public void testClusterStatus() throws Exception {
|
public void testClusterStatus() throws Exception {
|
||||||
if (!isJavaOk){
|
|
||||||
// This test requires jdk 1.7+
|
|
||||||
throw new RegionServerStoppedException("as expected by the test...");
|
|
||||||
}
|
|
||||||
|
|
||||||
TableName tn =
|
TableName tn =
|
||||||
TableName.valueOf("testClusterStatus");
|
TableName.valueOf("testClusterStatus");
|
||||||
|
@ -467,10 +456,6 @@ public class TestHCM {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testConnectionCut() throws Exception {
|
public void testConnectionCut() throws Exception {
|
||||||
if (!isJavaOk){
|
|
||||||
// This test requires jdk 1.7+
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TableName tableName = TableName.valueOf("HCM-testConnectionCut");
|
TableName tableName = TableName.valueOf("HCM-testConnectionCut");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue