[
https://issues.apache.org/jira/browse/SPARK-26536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun updated SPARK-26536:
----------------------------------
Description:
This issue upgrades Mockito from 1.10.19 to 2.23.4. The following changes are
required.
- Replace `org.mockito.Matchers` with `org.mockito.ArgumentMatchers`
- Replace `anyObject` with `any`
- Replace `getArgumentAt` with `getArgument` and add type annotation.
- Use `isNull` matcher in case of `null` is invoked.
{code}
saslHandler.channelInactive(null);
- verify(handler).channelInactive(any(TransportClient.class));
+ verify(handler).channelInactive(isNull());
{code}
- Make and use `doReturn` wrapper to avoid
[SI-4775|https://issues.scala-lang.org/browse/SI-4775]
{code}
private def doReturn(value: Any) = org.mockito.Mockito.doReturn(value,
Seq.empty: _*)
{code}
> Upgrade Mockito to 2.23.4
> -------------------------
>
> Key: SPARK-26536
> URL: https://issues.apache.org/jira/browse/SPARK-26536
> Project: Spark
> Issue Type: Sub-task
> Components: Build, Tests
> Affects Versions: 3.0.0
> Reporter: Dongjoon Hyun
> Assignee: Apache Spark
> Priority: Major
>
> This issue upgrades Mockito from 1.10.19 to 2.23.4. The following changes are
> required.
> - Replace `org.mockito.Matchers` with `org.mockito.ArgumentMatchers`
> - Replace `anyObject` with `any`
> - Replace `getArgumentAt` with `getArgument` and add type annotation.
> - Use `isNull` matcher in case of `null` is invoked.
> {code}
> saslHandler.channelInactive(null);
> - verify(handler).channelInactive(any(TransportClient.class));
> + verify(handler).channelInactive(isNull());
> {code}
> - Make and use `doReturn` wrapper to avoid
> [SI-4775|https://issues.scala-lang.org/browse/SI-4775]
> {code}
> private def doReturn(value: Any) = org.mockito.Mockito.doReturn(value,
> Seq.empty: _*)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]