This is an automated email from the ASF dual-hosted git repository.

srowen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 05ad1027a89 [SPARK-40391][SQL][TESTS][FOLLOWUP] Change to use 
`mockito-inline` instead of manually write MockMaker
05ad1027a89 is described below

commit 05ad1027a897b63a9f82f7131f6a024732a7e64d
Author: yangjie01 <yangji...@baidu.com>
AuthorDate: Mon Oct 24 08:30:34 2022 -0500

    [SPARK-40391][SQL][TESTS][FOLLOWUP] Change to use `mockito-inline` instead 
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 #38372 from LuciferYang/SPARK-40391.
    
    Authored-by: yangjie01 <yangji...@baidu.com>
    Signed-off-by: Sean Owen <sro...@gmail.com>
---
 sql/core/pom.xml                                       |  5 +++++
 .../mockito-extensions/org.mockito.plugins.MockMaker   | 18 ------------------
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/sql/core/pom.xml b/sql/core/pom.xml
index 7203fc59108..cfcf7455ad0 100644
--- a/sql/core/pom.xml
+++ b/sql/core/pom.xml
@@ -193,6 +193,11 @@
       <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-inline</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.seleniumhq.selenium</groupId>
       <artifactId>selenium-java</artifactId>
diff --git 
a/sql/core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker 
b/sql/core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
deleted file mode 100644
index eb074c6ae3f..00000000000
--- 
a/sql/core/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-mock-maker-inline


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to