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

veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-axiom.git


The following commit(s) were added to refs/heads/master by this push:
     new df21ff517 Remove setUp and tearDown methods from MatrixTestCase
df21ff517 is described below

commit df21ff517d254934e74f0d2bcdae49116953f182
Author: Copilot <[email protected]>
AuthorDate: Mon May 18 14:58:47 2026 +0100

    Remove setUp and tearDown methods from MatrixTestCase
    
    Co-authored-by: Andreas Veithen-Knowles <[email protected]>
---
 .../java/org/apache/axiom/testutils/suite/MatrixTest.java  | 10 ++--------
 .../org/apache/axiom/testutils/suite/MatrixTestCase.java   | 14 +-------------
 2 files changed, 3 insertions(+), 21 deletions(-)

diff --git 
a/testing/matrix-testsuite/src/main/java/org/apache/axiom/testutils/suite/MatrixTest.java
 
b/testing/matrix-testsuite/src/main/java/org/apache/axiom/testutils/suite/MatrixTest.java
index 1c732855a..0a7493734 100644
--- 
a/testing/matrix-testsuite/src/main/java/org/apache/axiom/testutils/suite/MatrixTest.java
+++ 
b/testing/matrix-testsuite/src/main/java/org/apache/axiom/testutils/suite/MatrixTest.java
@@ -33,8 +33,7 @@ import org.junit.jupiter.api.DynamicTest;
  * the ancestor {@link FanOutNode} chain will have bindings for all dimension 
types, plus any
  * implementation-level bindings from the root injector.
  *
- * <p>Once the instance is created, it is executed through the full {@link 
MatrixTestCase#setUp()}
- * → {@link MatrixTestCase#runTest()} → {@link MatrixTestCase#tearDown()} 
lifecycle.
+ * <p>Once the instance is created, {@link MatrixTestCase#runTest()} is 
invoked.
  */
 public class MatrixTest extends MatrixTestNode {
     private final Class<? extends MatrixTestCase> testClass;
@@ -53,12 +52,7 @@ public class MatrixTest extends MatrixTestNode {
         }
         return Stream.of(DynamicTest.dynamicTest(testClass.getSimpleName(), () 
-> {
             MatrixTestCase testInstance = injector.getInstance(testClass);
-            testInstance.setUp();
-            try {
-                testInstance.runTest();
-            } finally {
-                testInstance.tearDown();
-            }
+            testInstance.runTest();
         }));
     }
 }
diff --git 
a/testing/matrix-testsuite/src/main/java/org/apache/axiom/testutils/suite/MatrixTestCase.java
 
b/testing/matrix-testsuite/src/main/java/org/apache/axiom/testutils/suite/MatrixTestCase.java
index e8dc68fc6..be593d619 100644
--- 
a/testing/matrix-testsuite/src/main/java/org/apache/axiom/testutils/suite/MatrixTestCase.java
+++ 
b/testing/matrix-testsuite/src/main/java/org/apache/axiom/testutils/suite/MatrixTestCase.java
@@ -19,8 +19,7 @@
 package org.apache.axiom.testutils.suite;
 
 /**
- * Interface for matrix test cases. Defines the three-phase lifecycle ({@link 
#setUp()} &rarr;
- * {@link #runTest()} &rarr; {@link #tearDown()}) used by {@link MatrixTest}.
+ * Interface for matrix test cases. Used by {@link MatrixTest}.
  *
  * <p>This replaces the use of {@code junit.framework.TestCase} as the base 
type required by {@link
  * MatrixTest}. Test classes should implement this interface (directly or 
through a domain-specific
@@ -28,17 +27,6 @@ package org.apache.axiom.testutils.suite;
  * implement {@link #runTest()}.
  */
 public interface MatrixTestCase {
-    /**
-     * Sets up the test. Called before {@link #runTest()}. The default 
implementation does nothing.
-     */
-    default void setUp() throws Exception {}
-
     /** Runs the test logic. Implementing classes must provide this method. */
     void runTest() throws Throwable;
-
-    /**
-     * Tears down the test. Called after {@link #runTest()}, even if it 
throws. The default
-     * implementation does nothing.
-     */
-    default void tearDown() throws Exception {}
 }

Reply via email to