hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15965) Shell test changes. Use @shell.command instead directly calling functions in admin.rb and other libraries.
Date Tue, 07 Jun 2016 05:54:21 GMT

    [ https://issues.apache.org/jira/browse/HBASE-15965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15317902#comment-15317902
] 

Hudson commented on HBASE-15965:
--------------------------------

SUCCESS: Integrated in HBase-1.4 #198 (See [https://builds.apache.org/job/HBase-1.4/198/])
HBASE-15965 - Testing by executing a command will cover the exact path (appy: rev c2b4c6f6375346b5cf76a53efdcb36ea6239a30f)
* hbase-shell/src/test/ruby/test_helper.rb
* hbase-shell/src/test/java/org/apache/hadoop/hbase/client/TestReplicationShell.java
* hbase-shell/src/main/ruby/shell/commands/show_peer_tableCFs.rb
* hbase-shell/src/main/ruby/hbase/admin.rb
* hbase-shell/src/main/ruby/shell/commands/create.rb
* hbase-shell/src/main/ruby/shell/commands/list_peer_configs.rb
* hbase-shell/src/main/ruby/shell/commands/get_peer_config.rb
* hbase-shell/src/main/ruby/shell/commands/truncate.rb
* hbase-shell/src/test/ruby/hbase/replication_admin_test.rb
* hbase-shell/src/main/ruby/shell/commands.rb
* hbase-shell/src/main/ruby/shell.rb
* hbase-shell/src/main/ruby/shell/commands/list_peers.rb
* hbase-shell/src/main/ruby/shell/commands/list_namespace_tables.rb
* hbase-shell/src/main/ruby/hbase/table.rb
* hbase-shell/src/main/ruby/shell/commands/exists.rb
* hbase-shell/src/main/ruby/shell/commands/is_enabled.rb
* hbase-shell/src/test/ruby/hbase/visibility_labels_admin_test.rb
* hbase-shell/src/main/ruby/shell/commands/locate_region.rb
* hbase-shell/src/main/ruby/shell/commands/get_auths.rb
* hbase-shell/src/test/ruby/hbase/admin_test.rb
* hbase-shell/src/main/ruby/shell/commands/truncate_preserve.rb


> Shell test changes. Use @shell.command instead directly calling functions in admin.rb
and other libraries.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-15965
>                 URL: https://issues.apache.org/jira/browse/HBASE-15965
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Appy
>            Assignee: Appy
>             Fix For: 2.0.0, 1.4.0
>
>         Attachments: HBASE-15965.master.001.patch, HBASE-15965.master.002.patch, HBASE-15965.master.003.patch
>
>
> Testing by executing a command will cover the exact path users will trigger, so its better
then directly calling library functions in tests. Changing the tests to use @shell.command(:<command>,
args) to execute them like it's a command coming from shell.
> Norm change:
> Commands should print the output user would like to see, but in the end, should also
return the relevant value. This way:
> - Tests can use returned value to check that functionality works
> - Tests can capture stdout to assert particular kind of output user should see.
> - We do not print the return value in interactive mode and keep the output clean. See
Shell.command() function.
> Bugs found due to this change:
> - Uncovered bug in major_compact.rb with this approach. It was calling admin.majorCompact()
which doesn't exist but our tests didn't catch it since they directly tested admin.major_compact()
> - Enabled TestReplicationShell. If it's bad, flaky infra will take care of it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message