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-15975) logic in TestHTableDescriptor#testAddCoprocessorWithSpecStr is wrong
Date Thu, 09 Jun 2016 07:45:21 GMT

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

Hudson commented on HBASE-15975:
--------------------------------

SUCCESS: Integrated in HBase-1.2-IT #527 (See [https://builds.apache.org/job/HBase-1.2-IT/527/])
HBASE-15975 logic in TestHTableDescriptor#testAddCoprocessorWithSpecStr (matteo.bertozzi:
rev 8dc3668788bd978d9dd7e5c776d796ce604c5edb)
* hbase-client/src/test/java/org/apache/hadoop/hbase/TestHTableDescriptor.java


> logic in TestHTableDescriptor#testAddCoprocessorWithSpecStr is wrong
> --------------------------------------------------------------------
>
>                 Key: HBASE-15975
>                 URL: https://issues.apache.org/jira/browse/HBASE-15975
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: master
>            Reporter: huaxiang sun
>            Assignee: huaxiang sun
>            Priority: Trivial
>             Fix For: 2.0.0, 1.3.0, 1.2.2, 1.1.6, 0.98.21
>
>         Attachments: HBASE-15975-v001.patch, HBASE-15975-v002.patch
>
>
> While working on an unitest case for HBASE-14644, crossed over 
> testAddCoprocessorWithSpecStr().
> {code}
>    HTableDescriptor htd = new HTableDescriptor(TableName.META_TABLE_NAME);
>     String cpName = "a.b.c.d";
>     boolean expected = false;
>     try {
>       htd.addCoprocessorWithSpec(cpName);
>     } catch (IllegalArgumentException iae) {
>       expected = true;
>     }
>     if (!expected) fail();
>     // Try minimal spec.
>     try {
>       htd.addCoprocessorWithSpec("file:///some/path" + "|" + cpName);
>     } catch (IllegalArgumentException iae) {
>       expected = false;
>     }
>     if (expected) fail();
>     // Try more spec.
>     String spec = "hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2";
>     try {
>       htd.addCoprocessorWithSpec(spec);
>     } catch (IllegalArgumentException iae) {
>       expected = false; <<<< It should be true as it is expected to succeed.
>     }
>     if (expected) fail();
>     // Try double add of same coprocessor
>     try {
>       htd.addCoprocessorWithSpec(spec);
>     } catch (IOException ioe) {
>       expected = true;
>     }
>     if (!expected) fail();
> {code}



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

Mime
View raw message