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

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 5a67b40971b04c11d1f1ecc19852505c13be6e7e
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Mon Dec 2 19:27:52 2024 +0100

    Improved: Fix Java 17 2 warning issues (OFBIZ-12722)
    
    GroovyScriptTestCase.java:29: warning: [deprecation] GroovyTestCase in
    groovy.util has been deprecated
    public class GroovyScriptTestCase extends GroovyTestCase {
    
    This removes "groovy-test-suite" from test-suite.xsd and ModelTestSuite 
class.
    In trunk and 24.09 it's not used anywhere but in the code above.
---
 framework/testtools/dtd/test-suite.xsd             | 29 ----------------------
 .../org/apache/ofbiz/testtools/ModelTestSuite.java | 10 --------
 2 files changed, 39 deletions(-)

diff --git a/framework/testtools/dtd/test-suite.xsd 
b/framework/testtools/dtd/test-suite.xsd
index 6092aff5a3..74d6b71d11 100644
--- a/framework/testtools/dtd/test-suite.xsd
+++ b/framework/testtools/dtd/test-suite.xsd
@@ -89,35 +89,6 @@ under the License.
         </xs:attribute>
     </xs:attributeGroup>
 
-    <xs:element name="groovy-test-suite" substitutionGroup="TestCaseTypes">
-        <xs:annotation>
-            <xs:documentation>
-                Used for JUnit test suites written as a Groovy class. See 
http://groovy-lang.org/testing.html. This is rather to be used during 
development and testing.
-                When going to production; for performance reason 
(compilation), you should use rather use junit-test-suite and move the test 
file under main and use.
-                See existing examples.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:attributeGroup ref="attlist.groovy-test-suite"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:attributeGroup name="attlist.groovy-test-suite">
-        <xs:attribute type="xs:string" name="name"/>
-        <xs:attribute type="xs:string" name="location" use="required">
-            <xs:annotation>
-                <xs:documentation>
-                    Give the location where is groovy file that contains the 
test suite.
-                    You can use a flexible URL location like
-                    
component://service/src/test/groovy/org/apache/ofbizservice/test/TestServices.groovy
-                    This is rather to be used during development and testing
-                    When going to production you need to move the test file 
under main. See existing examples.
-                    When going to production; for performance reason 
(compilation), you should use rather use junit-test-suite and move the test 
file under main and use.
-                    See existing examples.
-                </xs:documentation>
-            </xs:annotation>
-        </xs:attribute>
-    </xs:attributeGroup>
-
     <xs:element name="service-test" substitutionGroup="TestCaseTypes">
         <xs:complexType>
             <xs:attributeGroup ref="attlist.service-test"/>
diff --git 
a/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ModelTestSuite.java
 
b/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ModelTestSuite.java
index a13c596f44..63784d7ddc 100644
--- 
a/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ModelTestSuite.java
+++ 
b/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ModelTestSuite.java
@@ -25,8 +25,6 @@ import java.util.List;
 
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.ofbiz.base.util.Debug;
-import org.apache.ofbiz.base.util.GeneralException;
-import org.apache.ofbiz.base.util.GroovyUtil;
 import org.apache.ofbiz.base.util.ObjectType;
 import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilMisc;
@@ -106,14 +104,6 @@ public class ModelTestSuite {
                 String errMsg = "Unable to load test suite class : " + 
className;
                 Debug.logError(e, errMsg, MODULE);
             }
-        } else if ("groovy-test-suite".equals(nodeName)) {
-            try {
-                Class<? extends TestCase> testClass =
-                        
UtilGenerics.cast(GroovyUtil.getScriptClassFromLocation(testElement.getAttribute("location")));
-                this.testList.add(new TestSuite(testClass, 
testElement.getAttribute("name")));
-            } catch (GeneralException e) {
-                Debug.logError(e, MODULE);
-            }
         } else if ("service-test".equals(nodeName)) {
             this.testList.add(new ServiceTest(caseName, testElement));
         } else if ("simple-method-test".equals(nodeName)) {

Reply via email to