File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
hbase-shell/src/test/ruby/hbase Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -324,19 +324,24 @@ def teardown
324324 define_test 'list decommissioned regionservers' do
325325 server_name = admin . getServerNames ( [ ] , true ) [ 0 ] . getServerName ( )
326326 command ( :decommission_regionservers , server_name )
327+ initial_number_of_rows = -1
327328 begin
328329 output = capture_stdout { command ( :list_decommissioned_regionservers ) }
329330 puts "#{ output } "
330331 assert output . include? 'DECOMMISSIONED REGION SERVERS'
331332 assert output . include? "#{ server_name } "
332- assert output . include? '1 row(s)'
333+ matches = output . match ( /(\d +) row\( s\) / )
334+ initial_number_of_rows = matches [ 1 ] . to_i unless matches . nil?
335+ assert initial_number_of_rows > 0
333336 ensure
334337 command ( :recommission_regionserver , server_name )
335338 output = capture_stdout { command ( :list_decommissioned_regionservers ) }
336339 puts "#{ output } "
337340 assert output . include? 'DECOMMISSIONED REGION SERVERS'
338341 assert ( output . include? "#{ server_name } " ) ? false : true
339- assert output . include? '0 row(s)'
342+ matches = output . match ( /(\d +) row\( s\) / )
343+ final_number_of_rows = matches [ 1 ] . to_i unless matches . nil?
344+ assert ( initial_number_of_rows - final_number_of_rows ) == 1
340345 end
341346 end
342347
You can’t perform that action at this time.
0 commit comments