vaijosh commented on code in PR #5462:
URL: https://github.com/apache/hbase/pull/5462#discussion_r1366537048
##########
hbase-shell/src/test/ruby/hbase/admin_test.rb:
##########
@@ -168,6 +168,17 @@ def teardown
#-------------------------------------------------------------------------------
+ define_test "truncate region should work" do
+ @t_name = 'hbase_shell_truncate_region'
+ drop_test_table(@t_name)
+ admin.create(@t_name, 'a', NUMREGIONS => 10, SPLITALGO =>
'HexStringSplit')
+ r1 = command(:locate_region, @t_name, '1')
+ region1 = r1.getRegion.getRegionNameAsString
+ command(:truncate_region, region1)
Review Comment:
@NihalJain Thanks for the comment.
Initially I was also planning it. But later realised that all those
assertions are already covered as part of
[TestTruncateRegionProcedure](https://github.com/apache/hbase/blob/523e4f971d7c990c45574b203bdaf6d7935018d2/hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestTruncateRegionProcedure.java#L61)
and
[TestAsyncRegionAdminApi2](https://github.com/apache/hbase/blob/523e4f971d7c990c45574b203bdaf6d7935018d2/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncRegionAdminApi2.java#L61).
I consider current test as a simple integration test to make sure that call
is going to admin and truncateRegion procedure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]