You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Appy (JIRA)" <ji...@apache.org> on 2018/01/25 22:04:00 UTC

[jira] [Updated] (HBASE-19862) Fix TestTokenAuthentication - fake RegionCoprocessorEnvironment is not of type HasRegionServerServices

     [ https://issues.apache.org/jira/browse/HBASE-19862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Appy updated HBASE-19862:
-------------------------
    Attachment: HBASE-19862.branch-2.001.patch

> Fix TestTokenAuthentication - fake RegionCoprocessorEnvironment is not of type HasRegionServerServices
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-19862
>                 URL: https://issues.apache.org/jira/browse/HBASE-19862
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Appy
>            Assignee: Appy
>            Priority: Major
>         Attachments: HBASE-19862.branch-2.001.patch
>
>
> We have temporary HasRegionServerServices (added in HBASE-19007) and concept of CoreCoprocessors which require that whichever *CoprocessorEnvironment they get, it should also implement HasRegionServerServices.
> This test builds mock RegionCpEnv for TokenProvider (RegionCoprocessor), but it falls short of what's expected and results in following exceptions in test logs
> {noformat}
> 2018-01-25 14:38:54,855 ERROR [TokenServer:d9a9782cd075,39492,1516891133911] helpers.MarkerIgnoringBase(159): Aborting on: org.apache.hadoop.hbase.security.token.TestTokenAuthentication$TokenServer$2 cannot be cast to org.apache.hadoop.hbase.coprocessor.HasRegionServerServices
> java.lang.ClassCastException: org.apache.hadoop.hbase.security.token.TestTokenAuthentication$TokenServer$2 cannot be cast to org.apache.hadoop.hbase.coprocessor.HasRegionServerServices
> 	at org.apache.hadoop.hbase.security.token.TokenProvider.start(TokenProvider.java:70)
> 	at org.apache.hadoop.hbase.security.token.TestTokenAuthentication$TokenServer.initialize(TestTokenAuthentication.java:275)
> 	at org.apache.hadoop.hbase.security.token.TestTokenAuthentication$TokenServer.run(TestTokenAuthentication.java:347)
> {noformat}
> Patch adds the missing interface to the mock. Also, uses Mockito to mock the interfaces rather the crude way.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)