Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jul 12, 2019

What changes were proposed in this pull request?

This PR aims to upgrade Mockito from 2.23.4 to 2.28.2 in order to bring the latest bug fixes and to be up-to-date for JDK9+ support before Apache Spark 3.0.0. There is Mockito 3.0 released 4 days ago, but we had better wait and see for the stability.

RELEASE NOTE
https://github.com/mockito/mockito/blob/release/2.x/doc/release-notes/official.md

NOTABLE FIXES

  • Configure the MethodVisitor for Java 11+ compatibility (2.27.5)
  • When mock is called multiple times, and verify fails, the error message reports only the first invocation (2.27.4)
  • Memory leak in mockito-inline calling method on mock with at least a mock as parameter (2.25.0)
  • Cross-references and a single spy cause memory leak (2.25.0)
  • Nested spies cause memory leaks (2.25.0)
  • [Java 9 support] ClassCastExceptions with JDK9 javac (2.24.9, 2.24.3)
  • Return null instead of causing a CCE (2.24.9, 2.24.3)
  • Issue with mocking type in "java.util.*", Java 12 (2.24.2)

Mainly, Maven (Hadoop-2.7/Hadoop-3.2) and SBT(Hadoop-2.7) Jenkins test passed.

How was this patch tested?

Pass the Jenkins with the exiting UTs.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28370][BUILD][TEST] Upgrade Mockito to 2.28.2 [SPARK-28370][BUILD][TEST][test-maven] Upgrade Mockito to 2.28.2 Jul 12, 2019
@dongjoon-hyun
Copy link
Member Author

Retest this please

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28370][BUILD][TEST][test-maven] Upgrade Mockito to 2.28.2 [SPARK-28370][BUILD][TEST][test-maven][test-hadoop3.2] Upgrade Mockito to 2.28.2 Jul 12, 2019
@dongjoon-hyun
Copy link
Member Author

Retest this please.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28370][BUILD][TEST][test-maven][test-hadoop3.2] Upgrade Mockito to 2.28.2 [SPARK-28370][BUILD][TEST] Upgrade Mockito to 2.28.2 Jul 12, 2019
@SparkQA
Copy link

SparkQA commented Jul 12, 2019

Test build #107606 has finished for PR 25139 at commit 5d9758a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 12, 2019

Test build #107608 has finished for PR 25139 at commit 5d9758a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28370][BUILD][TEST] Upgrade Mockito to 2.28.2 [SPARK-28370][BUILD][TEST][test-maven] Upgrade Mockito to 2.28.2 Jul 12, 2019
@dongjoon-hyun
Copy link
Member Author

Retest this please.

@SparkQA
Copy link

SparkQA commented Jul 12, 2019

Test build #107609 has finished for PR 25139 at commit 5d9758a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-28370][BUILD][TEST][test-maven] Upgrade Mockito to 2.28.2 [SPARK-28370][BUILD][TEST] Upgrade Mockito to 2.28.2 Jul 12, 2019
@dongjoon-hyun
Copy link
Member Author

  • SBT (Hadoop-2.7) and Maven (Hadoop-3.2) passed.
  • Maven (Hadoop-2.7) failed due to a irrelevant failure and retriggered.

@SparkQA
Copy link

SparkQA commented Jul 13, 2019

Test build #107619 has finished for PR 25139 at commit 5d9758a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

  • Maven (Hadoop-2.7) also passed, too.

@dongjoon-hyun
Copy link
Member Author

cc @srowen , @gatorsmile , @dbtsai

@dongjoon-hyun
Copy link
Member Author

Thank you, @srowen !
Merged to master.

vinodkc pushed a commit to vinodkc/spark that referenced this pull request Jul 18, 2019
## What changes were proposed in this pull request?

This PR aims to upgrade Mockito from **2.23.4** to **2.28.2** in order to bring the latest bug fixes and to be up-to-date for JDK9+ support before Apache Spark 3.0.0. There is Mockito 3.0 released 4 days ago, but we had better wait and see for the stability.

**RELEASE NOTE**
https://github.com/mockito/mockito/blob/release/2.x/doc/release-notes/official.md

**NOTABLE FIXES**
- Configure the MethodVisitor for Java 11+ compatibility (2.27.5)
- When mock is called multiple times, and verify fails, the error message reports only the first invocation (2.27.4)
- Memory leak in mockito-inline calling method on mock with at least a mock as parameter (2.25.0)
- Cross-references and a single spy cause memory leak (2.25.0)
- Nested spies cause memory leaks (2.25.0)
- [Java 9 support] ClassCastExceptions with JDK9 javac (2.24.9, 2.24.3)
- Return null instead of causing a CCE (2.24.9, 2.24.3)
- Issue with mocking type in "java.util.*", Java 12 (2.24.2)

Mainly, Maven (Hadoop-2.7/Hadoop-3.2) and SBT(Hadoop-2.7) Jenkins test passed.

## How was this patch tested?

Pass the Jenkins with the exiting UTs.

Closes apache#25139 from dongjoon-hyun/SPARK-28370.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
srowen pushed a commit that referenced this pull request Nov 30, 2019
### What changes were proposed in this pull request?

We used 2.28.2 of Mockito as of #25139 because 3.0.0 might be unstable. Now 3.1.0 is released.

See release notes - https://github.com/mockito/mockito/blob/v3.1.0/doc/release-notes/official.md

### Why are the changes needed?

To bring the fixes made in the dependency.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Jenkins will test.

Closes #26707 from HyukjinKwon/upgrade-Mockito.

Authored-by: HyukjinKwon <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
attilapiros pushed a commit to attilapiros/spark that referenced this pull request Dec 6, 2019
### What changes were proposed in this pull request?

We used 2.28.2 of Mockito as of apache#25139 because 3.0.0 might be unstable. Now 3.1.0 is released.

See release notes - https://github.com/mockito/mockito/blob/v3.1.0/doc/release-notes/official.md

### Why are the changes needed?

To bring the fixes made in the dependency.

### Does this PR introduce any user-facing change?

No.

### How was this patch tested?

Jenkins will test.

Closes apache#26707 from HyukjinKwon/upgrade-Mockito.

Authored-by: HyukjinKwon <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants