Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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
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)
Patch adds the missing interface to the mock. Also, uses Mockito to mock the interfaces rather the crude way.
Attachments
Attachments
Issue Links
- is related to
-
HBASE-19803 False positive for the HBASE-Find-Flaky-Tests job
- Resolved