[
https://issues.apache.org/jira/browse/HBASE-22534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16855977#comment-16855977
]
Sakthi commented on HBASE-22534:
--------------------------------
Currently mockito-core version is at 2.1.0. According to
[https://github.com/mockito/mockito/blob/release/2.x/doc/release-notes/official.md],
looks like Java 11 compatibility was introduced in 2.19+. And 2.23.2 claims to
have full java 11 support after byte-buddy fix etc. I haven't yet tried
upgrading and checking though. But nevertheless, by upgrading mockito, I'm not
sure if other tests based on mockito start failing or need to changed. So would
say comparatively little higher risk but worth making a note of considering
up-gradation of mockito in near future.
> TestCellUtil fails when run on JDK11
> ------------------------------------
>
> Key: HBASE-22534
> URL: https://issues.apache.org/jira/browse/HBASE-22534
> Project: HBase
> Issue Type: Bug
> Reporter: Sakthi
> Assignee: Sakthi
> Priority: Minor
> Attachments: hbase-22534.master.001.patch
>
>
> When built on Java 8 and unit tests are run on Java 11, TestCellUtil fails. A
> sample stacktrace:
> {code}
> Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.096 s <<<
> FAILURE! - in org.apache.hadoop.hbase.TestCellUtil
> testGetType(org.apache.hadoop.hbase.TestCellUtil) Time elapsed: 0.544 s <<<
> ERROR!
> org.mockito.exceptions.base.MockitoException:
> Cannot call abstract real method on java object!
> Calling real methods is only possible when mocking non abstract method.
> //correct example:
> when(mockOfConcreteClass.nonAbstractMethod()).thenCallRealMethod();
> at
> org.apache.hadoop.hbase.TestCellUtil.testGetType(TestCellUtil.java:543){code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)