You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ni...@apache.org on 2023/12/21 12:21:33 UTC
(hbase) branch master updated: HBASE-28275 Flaky test: Fix 'test_list_decommissioned_regionservers' in TestAdminShell2.java (#5594)
This is an automated email from the ASF dual-hosted git repository.
nihaljain pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new d084b4c99b6 HBASE-28275 Flaky test: Fix 'test_list_decommissioned_regionservers' in TestAdminShell2.java (#5594)
d084b4c99b6 is described below
commit d084b4c99b697942c34b7647d405be58d6edadb0
Author: Nihal Jain <ni...@apache.org>
AuthorDate: Thu Dec 21 17:51:27 2023 +0530
HBASE-28275 Flaky test: Fix 'test_list_decommissioned_regionservers' in TestAdminShell2.java (#5594)
Signed-off-by: Bryan Beaudreault <bb...@apache.org>
---
hbase-shell/src/test/ruby/hbase/admin2_test.rb | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hbase-shell/src/test/ruby/hbase/admin2_test.rb b/hbase-shell/src/test/ruby/hbase/admin2_test.rb
index 83eaf38a7e5..b840231f7fc 100644
--- a/hbase-shell/src/test/ruby/hbase/admin2_test.rb
+++ b/hbase-shell/src/test/ruby/hbase/admin2_test.rb
@@ -324,19 +324,24 @@ class CommissioningTest < Test::Unit::TestCase
define_test 'list decommissioned regionservers' do
server_name = admin.getServerNames([], true)[0].getServerName()
command(:decommission_regionservers, server_name)
+ initial_number_of_rows = -1
begin
output = capture_stdout { command(:list_decommissioned_regionservers) }
puts "#{output}"
assert output.include? 'DECOMMISSIONED REGION SERVERS'
assert output.include? "#{server_name}"
- assert output.include? '1 row(s)'
+ matches = output.match(/(\d+) row\(s\)/)
+ initial_number_of_rows = matches[1].to_i unless matches.nil?
+ assert initial_number_of_rows > 0
ensure
command(:recommission_regionserver, server_name)
output = capture_stdout { command(:list_decommissioned_regionservers) }
puts "#{output}"
assert output.include? 'DECOMMISSIONED REGION SERVERS'
assert (output.include? "#{server_name}") ? false : true
- assert output.include? '0 row(s)'
+ matches = output.match(/(\d+) row\(s\)/)
+ final_number_of_rows = matches[1].to_i unless matches.nil?
+ assert (initial_number_of_rows - final_number_of_rows) == 1
end
end