You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nk...@apache.org on 2014/05/23 19:34:52 UTC
git commit: HBASE-10573 Use Netty 4 - addendum
Repository: hbase
Updated Branches:
refs/heads/master ca2a11cd3 -> 220037c46
HBASE-10573 Use Netty 4 - addendum
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/220037c4
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/220037c4
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/220037c4
Branch: refs/heads/master
Commit: 220037c465735f3f7c88fa1cdd966a872df714e5
Parents: ca2a11c
Author: Nicolas Liochon <nk...@gmail.com>
Authored: Fri May 23 19:34:49 2014 +0200
Committer: Nicolas Liochon <nk...@gmail.com>
Committed: Fri May 23 19:34:49 2014 +0200
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/client/TestHCM.java | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/220037c4/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
index e4e9405..2761b8f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
@@ -75,6 +75,7 @@ import org.apache.hadoop.hbase.util.JVMClusterUtil;
import org.apache.hadoop.hbase.util.ManualEnvironmentEdge;
import org.apache.hadoop.hbase.util.Threads;
import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
+import org.jboss.netty.util.internal.DetectionUtil;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -106,6 +107,8 @@ public class TestHCM {
private static final byte[] ROW_X = Bytes.toBytes("xxx");
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.
*/
@@ -127,7 +130,9 @@ public class TestHCM {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
- TEST_UTIL.getConfiguration().setBoolean(HConstants.STATUS_PUBLISHED, true);
+ if (isJavaOk) {
+ TEST_UTIL.getConfiguration().setBoolean(HConstants.STATUS_PUBLISHED, true);
+ }
TEST_UTIL.startMiniCluster(2);
}
@@ -214,6 +219,11 @@ public class TestHCM {
@Test(expected = RegionServerStoppedException.class)
public void testClusterStatus() throws Exception {
+ if (!isJavaOk){
+ // This test requires jdk 1.7+
+ throw new RegionServerStoppedException("as expected by the test...");
+ }
+
TableName tn =
TableName.valueOf("testClusterStatus");
byte[] cf = "cf".getBytes();
@@ -460,6 +470,11 @@ public class TestHCM {
*/
@Test
public void testConnectionCut() throws Exception {
+ if (!isJavaOk){
+ // This test requires jdk 1.7+
+ return;
+ }
+
String tableName = "HCM-testConnectionCut";
TEST_UTIL.createTable(tableName.getBytes(), FAM_NAM).close();