hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-19269 Reenable TestShellRSGroups
Date Fri, 17 Nov 2017 19:57:09 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 63b02a072 -> 3330dd517


HBASE-19269 Reenable TestShellRSGroups

Signed-off-by: Michael Stack <stack@apache.org>


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

Branch: refs/heads/branch-2
Commit: 3330dd517e5f322b8ab54ccc06a92844de3c1d35
Parents: 63b02a0
Author: Guangxu Cheng <guangxucheng@gmail.com>
Authored: Thu Nov 16 16:33:58 2017 +0800
Committer: Michael Stack <stack@apache.org>
Committed: Fri Nov 17 11:57:01 2017 -0800

----------------------------------------------------------------------
 .../hbase/client/rsgroup/TestShellRSGroups.java |  2 --
 .../src/test/ruby/shell/rsgroup_shell_test.rb   | 24 ++++++++------------
 2 files changed, 9 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3330dd51/hbase-shell/src/test/rsgroup/org/apache/hadoop/hbase/client/rsgroup/TestShellRSGroups.java
----------------------------------------------------------------------
diff --git a/hbase-shell/src/test/rsgroup/org/apache/hadoop/hbase/client/rsgroup/TestShellRSGroups.java
b/hbase-shell/src/test/rsgroup/org/apache/hadoop/hbase/client/rsgroup/TestShellRSGroups.java
index 8e9c60c..26fa81d 100644
--- a/hbase-shell/src/test/rsgroup/org/apache/hadoop/hbase/client/rsgroup/TestShellRSGroups.java
+++ b/hbase-shell/src/test/rsgroup/org/apache/hadoop/hbase/client/rsgroup/TestShellRSGroups.java
@@ -33,7 +33,6 @@ import org.jruby.embed.PathType;
 import org.jruby.embed.ScriptingContainer;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -44,7 +43,6 @@ import java.util.List;
 //Separate Shell test class for Groups
 //Since we need to use a different balancer and run more than 1 RS
 @Category({ClientTests.class, LargeTests.class})
-@Ignore
 public class TestShellRSGroups {
   final Log LOG = LogFactory.getLog(getClass());
   private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();

http://git-wip-us.apache.org/repos/asf/hbase/blob/3330dd51/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb b/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb
index b7cfb85..8c33459 100644
--- a/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb
+++ b/hbase-shell/src/test/ruby/shell/rsgroup_shell_test.rb
@@ -50,7 +50,7 @@ module Hbase
       hostport = @rsgroup_admin.getRSGroupInfo('default').getServers.iterator.next
       @shell.command('get_rsgroup', 'default')
       hostPortStr = hostport.toString
-      @shell.command('get_server_rsgroup', [hostPortStr])
+      @shell.command('get_server_rsgroup', hostPortStr)
       @shell.command('move_servers_rsgroup',
                      group_name,
                      [hostPortStr])
@@ -62,23 +62,17 @@ module Hbase
                      [table_name])
       assert_equal(1, @rsgroup_admin.getRSGroupInfo(group_name).getTables.count)
 
-      count = 0
-      @hbase.rsgroup_admin().get_rsgroup(group_name) do |line|
-        case count
-        when 1
-          assert_equal(hostPortStr, line)
-        when 3
-          assert_equal(table_name, line)
-        end
-        count += 1
-      end
-      assert_equal(4, count)
+      group = @hbase.rsgroup_admin.get_rsgroup(group_name)
+      assert_not_nil(group)
+      assert_equal(1, group.getServers.count)
+      assert_equal(1, group.getTables.count)
+      assert_equal(hostPortStr, group.getServers.iterator.next.toString)
+      assert_equal(table_name, group.getTables.iterator.next.toString)
 
-      assert_equal(2,
-                   @hbase.rsgroup_admin().list_rs_groups.count)
+      assert_equal(2, @hbase.rsgroup_admin.list_rs_groups.count)
 
       # just run it to verify jruby->java api binding
-      @hbase.rsgroup_admin().balance_rs_group(group_name)
+      @hbase.rsgroup_admin.balance_rs_group(group_name)
     end
 
     # we test exceptions that could be thrown by the ruby wrappers


Mime
View raw message