HBASE-19903 Split TestShell so it will not time out

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

Branch: refs/heads/HBASE-19064
Commit: 01a2869363d45c7692f3984f31ab8c7a50d117fc
Parents: 50c705d
Author: zhangduo <zhang...@apache.org>
Authored: Thu Feb 15 21:11:14 2018 +0800
Committer: zhangduo <zhang...@apache.org>
Committed: Fri Feb 16 00:17:19 2018 +0800

----------------------------------------------------------------------
 .../hadoop/hbase/client/TestAdminShell.java     | 42 ++++++++++++++++++++
 .../hadoop/hbase/client/TestQuotasShell.java    | 42 ++++++++++++++++++++
 .../apache/hadoop/hbase/client/TestShell.java   |  6 +--
 .../hadoop/hbase/client/TestShellNoCluster.java |  4 +-
 .../hadoop/hbase/client/TestTableShell.java     | 42 ++++++++++++++++++++
 5 files changed, 131 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/01a28693/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestAdminShell.java
----------------------------------------------------------------------
diff --git 
a/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestAdminShell.java 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestAdminShell.java
new file mode 100644
index 0000000..1835d88
--- /dev/null
+++ 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestAdminShell.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import java.io.IOException;
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.testclassification.ClientTests;
+import org.apache.hadoop.hbase.testclassification.LargeTests;
+import org.jruby.embed.PathType;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category({ ClientTests.class, LargeTests.class })
+public class TestAdminShell extends AbstractTestShell {
+
+  @ClassRule
+  public static final HBaseClassTestRule CLASS_RULE =
+    HBaseClassTestRule.forClass(TestAdminShell.class);
+
+  @Test
+  public void testRunShellTests() throws IOException {
+    System.setProperty("shell.test.include", "admin_test.rb");
+    // Start all ruby tests
+    jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb");
+  }
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/01a28693/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestQuotasShell.java
----------------------------------------------------------------------
diff --git 
a/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestQuotasShell.java 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestQuotasShell.java
new file mode 100644
index 0000000..482bf0f
--- /dev/null
+++ 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestQuotasShell.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import java.io.IOException;
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.testclassification.ClientTests;
+import org.apache.hadoop.hbase.testclassification.LargeTests;
+import org.jruby.embed.PathType;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category({ ClientTests.class, LargeTests.class })
+public class TestQuotasShell extends AbstractTestShell {
+
+  @ClassRule
+  public static final HBaseClassTestRule CLASS_RULE =
+    HBaseClassTestRule.forClass(TestQuotasShell.class);
+
+  @Test
+  public void testRunShellTests() throws IOException {
+    System.setProperty("shell.test.include", "quotas_test.rb");
+    // Start all ruby tests
+    jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb");
+  }
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/01a28693/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShell.java
----------------------------------------------------------------------
diff --git 
a/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShell.java 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShell.java
index e3de94a..ab36edc 100644
--- a/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShell.java
+++ b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShell.java
@@ -30,12 +30,12 @@ import org.junit.experimental.categories.Category;
 public class TestShell extends AbstractTestShell {
 
   @ClassRule
-  public static final HBaseClassTestRule CLASS_RULE =
-      HBaseClassTestRule.forClass(TestShell.class);
+  public static final HBaseClassTestRule CLASS_RULE = 
HBaseClassTestRule.forClass(TestShell.class);
 
   @Test
   public void testRunShellTests() throws IOException {
-    System.setProperty("shell.test.exclude", 
"replication_admin_test.rb,rsgroup_shell_test.rb");
+    System.setProperty("shell.test.exclude", 
"replication_admin_test.rb,rsgroup_shell_test.rb," +
+      "admin_test.rb,table_test.rb,quotas_test.rb");
     // Start all ruby tests
     jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb");
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/01a28693/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShellNoCluster.java
----------------------------------------------------------------------
diff --git 
a/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShellNoCluster.java
 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShellNoCluster.java
index 3dfd991..3172e97 100644
--- 
a/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShellNoCluster.java
+++ 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestShellNoCluster.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 import org.apache.hadoop.hbase.HBaseClassTestRule;
 import org.apache.hadoop.hbase.testclassification.ClientTests;
-import org.apache.hadoop.hbase.testclassification.LargeTests;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.jruby.embed.PathType;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -30,7 +30,7 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-@Category({ ClientTests.class, LargeTests.class })
+@Category({ ClientTests.class, MediumTests.class })
 public class TestShellNoCluster extends AbstractTestShell {
 
   @ClassRule

http://git-wip-us.apache.org/repos/asf/hbase/blob/01a28693/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestTableShell.java
----------------------------------------------------------------------
diff --git 
a/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestTableShell.java 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestTableShell.java
new file mode 100644
index 0000000..e2fdcaa
--- /dev/null
+++ 
b/hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestTableShell.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hbase.client;
+
+import java.io.IOException;
+import org.apache.hadoop.hbase.HBaseClassTestRule;
+import org.apache.hadoop.hbase.testclassification.ClientTests;
+import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.jruby.embed.PathType;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+@Category({ ClientTests.class, MediumTests.class })
+public class TestTableShell extends AbstractTestShell {
+
+  @ClassRule
+  public static final HBaseClassTestRule CLASS_RULE =
+    HBaseClassTestRule.forClass(TestTableShell.class);
+
+  @Test
+  public void testRunShellTests() throws IOException {
+    System.setProperty("shell.test.include", "table_test.rb");
+    // Start all ruby tests
+    jruby.runScriptlet(PathType.ABSOLUTE, "src/test/ruby/tests_runner.rb");
+  }
+}

Reply via email to