[
https://issues.apache.org/jira/browse/HADOOP-16503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16941812#comment-16941812
]
Kinga Marton commented on HADOOP-16503:
---------------------------------------
Very good point [~adam.antal]! I was totally convinced that the fix for
YARN-9784 handled only the flakiness of the test and we will need this patch
for the Mockito related issue with JDK11, but it seems that we will not need
this patch because the test is passing with JDK11 as well after YARN-9784. So I
will close this Jira, since is not an issue anymore.
> [JDK11] TestLeafQueue tests are failing due to WrongTypeOfReturnValue
> ---------------------------------------------------------------------
>
> Key: HADOOP-16503
> URL: https://issues.apache.org/jira/browse/HADOOP-16503
> Project: Hadoop Common
> Issue Type: Sub-task
> Affects Versions: 3.2.0
> Reporter: Adam Antal
> Assignee: Kinga Marton
> Priority: Major
> Attachments: HADOOP-16503.001.patch, HADOOP-16503.002.patch,
> HADOOP-16503.003.patch
>
>
> Many of the tests in
> {{org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestLeafQueue}}
> fails with the following error message running on JDK11:
> {noformat}
> [ERROR]
> testSingleQueueWithOneUser(org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestLeafQueue)
> Time elapsed: 0.204 s <<< ERROR!
> org.mockito.exceptions.misusing.WrongTypeOfReturnValue:
> YarnConfiguration cannot be returned by getRMNodes()
> getRMNodes() should return ConcurrentMap
> ***
> If you're unsure why you're getting above error read on.
> Due to the nature of the syntax above problem might occur because:
> 1. This exception *might* occur in wrongly written multi-threaded tests.
> Please refer to Mockito FAQ on limitations of concurrency testing.
> 2. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub
> spies -
> - with doReturn|Throw() family of methods. More in javadocs for
> Mockito.spy() method.
> at
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestLeafQueue.setUpInternal(TestLeafQueue.java:221)
> at
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.TestLeafQueue.setUp(TestLeafQueue.java:144)
> ...
> {noformat}
> This is due to the actual execution of the call, while we need to record only
> the invocation of it. According to the javadocs and other folks.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]