hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/4] hbase git commit: Revert "Amend HBASE-18813 TestCanaryTool fails on branch-1 / branch-1.4"
Date Fri, 15 Sep 2017 17:42:19 GMT
Revert "Amend HBASE-18813 TestCanaryTool fails on branch-1 / branch-1.4"

This reverts commit aa7c93c6597f378fe4bed1ec7f9094ac9f4aa356.


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

Branch: refs/heads/branch-1
Commit: 469d6bf457c2c4d8ebe10c1e39004a6b9d907112
Parents: 862a717
Author: Andrew Purtell <apurtell@apache.org>
Authored: Fri Sep 15 10:19:22 2017 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Fri Sep 15 10:42:04 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/tool/TestCanaryTool.java   | 13 -------------
 1 file changed, 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/469d6bf4/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/TestCanaryTool.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/TestCanaryTool.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/TestCanaryTool.java
index 3e714b0..f186281 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/TestCanaryTool.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/tool/TestCanaryTool.java
@@ -120,7 +120,6 @@ public class TestCanaryTool {
 
   @Test
   public void testReadTableTimeouts() throws Exception {
-    if (skipOldJREs()) return;
     final TableName [] tableNames = new TableName[2];
     tableNames[0] = TableName.valueOf("testReadTableTimeouts1");
     tableNames[1] = TableName.valueOf("testReadTableTimeouts2");
@@ -164,7 +163,6 @@ public class TestCanaryTool {
 
   @Test
   public void testWriteTableTimeout() throws Exception {
-    if (skipOldJREs()) return;
     ExecutorService executor = new ScheduledThreadPoolExecutor(1);
     Canary.RegionStdOutSink sink = spy(new Canary.RegionStdOutSink());
     Canary canary = new Canary(executor, sink);
@@ -183,7 +181,6 @@ public class TestCanaryTool {
   //no table created, so there should be no regions
   @Test
   public void testRegionserverNoRegions() throws Exception {
-    if (skipOldJREs()) return;
     runRegionserverCanary();
     verify(mockAppender).doAppend(argThat(new ArgumentMatcher<LoggingEvent>() {
       @Override
@@ -196,7 +193,6 @@ public class TestCanaryTool {
   //by creating a table, there shouldn't be any region servers not serving any regions
   @Test
   public void testRegionserverWithRegions() throws Exception {
-    if (skipOldJREs()) return;
     TableName tableName = TableName.valueOf("testTable");
     testingUtility.createTable(tableName, new byte[][] { FAMILY });
     runRegionserverCanary();
@@ -231,15 +227,6 @@ public class TestCanaryTool {
     assertEquals("verify no read error count", 0, canary.getReadFailures().size());
   }
 
-  // We have unexpected trouble asserting with custom matchers using Mockito on Java <
8,
-  // so skip the relevant tests if running on an older JRE.
-  private static boolean skipOldJREs() {
-    String specVersion[] = System.getProperty("java.specification.version").split("\\.");
-    int majorVersion = Integer.valueOf(specVersion[0]);
-    int minorVersion = Integer.valueOf(specVersion[1]);
-    return !(majorVersion > 1 || (majorVersion == 1 && minorVersion > 7));
-  }
-
   private void runRegionserverCanary() throws Exception {
     ExecutorService executor = new ScheduledThreadPoolExecutor(1);
     Canary canary = new Canary(executor, new Canary.RegionServerStdOutSink());


Mime
View raw message