Skip to content

Conversation

@LuciferYang
Copy link
Contributor

@LuciferYang LuciferYang commented Oct 24, 2022

What changes were proposed in this pull request?

This pr aims use mockito-inline instead of manually write MockMaker

Why are the changes needed?

mockito-inline is a more recommended way to use mockito to mocking final types, enums and final methods
and mllib and mllib-local module is already using mockito-inline.

Does this PR introduce any user-facing change?

No

How was this patch tested?

  • Pass GitHub Actions
  • Manual test:run build/sbt clean "sql/testOnly *QueryExecutionErrorsSuite" with Java 8u352, 11.0.17 and 17.0.5, all 3 Java versions passed

@LuciferYang LuciferYang changed the title [SPARK-40391][SQL][TESTS] Change to use mockito-inline instead of manually added MockMaker [SPARK-40391][SQL][TESTS][FOLLOWUP] Change to use mockito-inline instead of manually added MockMaker Oct 24, 2022
@LuciferYang
Copy link
Contributor Author

image

@LuciferYang LuciferYang changed the title [SPARK-40391][SQL][TESTS][FOLLOWUP] Change to use mockito-inline instead of manually added MockMaker [SPARK-40391][SQL][TESTS][FOLLOWUP] Change to use mockito-inline instead of manually write MockMaker Oct 24, 2022
@LuciferYang
Copy link
Contributor Author

LuciferYang commented Oct 24, 2022

cc @MaxGekk @HyukjinKwon @srowen

@LuciferYang
Copy link
Contributor Author

@panbingkun as discuss offline, I run build/sbt clean "sql/testOnly *QueryExecutionErrorsSuite" with this pr, all test passed

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for CI.

@LuciferYang
Copy link
Contributor Author

All passed

@srowen srowen closed this in 05ad102 Oct 24, 2022
@srowen
Copy link
Member

srowen commented Oct 24, 2022

Merged to master

@LuciferYang
Copy link
Contributor Author

Thanks @srowen @HyukjinKwon @MaxGekk @panbingkun

SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
…stead of manually write MockMaker

### What changes were proposed in this pull request?
This pr aims use `mockito-inline` instead of manually write `MockMaker`

### Why are the changes needed?
`mockito-inline` is a more recommended [way](https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#39) to use mockito to mocking final types, enums and final methods
 and `mllib` and `mllib-local` module is already using `mockito-inline`.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?

- Pass GitHub Actions
- Manual test:run `build/sbt clean "sql/testOnly *QueryExecutionErrorsSuite"` with Java 8u352, 11.0.17 and 17.0.5, all 3 Java versions passed

Closes apache#38372 from LuciferYang/SPARK-40391.

Authored-by: yangjie01 <[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.

5 participants