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

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 40872012b1991ac30eb561d5d4d3843e7058f1fc
Author: Otavio Rodolfo Piske <angusyo...@gmail.com>
AuthorDate: Thu May 23 10:44:25 2024 +0200

    CAMEL-20785: stop allowing overriding the context setup method
---
 .../main/java/org/apache/camel/test/junit5/CamelTestSupport.java   | 3 ++-
 .../camel/test/junit5/CamelTestSupportOneContextForAllTest.java    | 7 -------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git 
a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
 
b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
index cda6d716887..c39b2d2e829 100644
--- 
a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
+++ 
b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
@@ -413,7 +413,8 @@ public abstract class CamelTestSupport
         }
     }
 
-    protected void doSetUp() throws Exception {
+    @Deprecated(since = "4.7.0")
+    protected final void doSetUp() throws Exception {
         LOG.debug("setUp test");
         // jmx is enabled if we have configured to use it, if dump route 
coverage is enabled (it requires JMX) or if
         // the component camel-debug is in the classpath
diff --git 
a/components/camel-test/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/CamelTestSupportOneContextForAllTest.java
 
b/components/camel-test/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/CamelTestSupportOneContextForAllTest.java
index 58d1340608e..06f2d13acbc 100644
--- 
a/components/camel-test/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/CamelTestSupportOneContextForAllTest.java
+++ 
b/components/camel-test/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/CamelTestSupportOneContextForAllTest.java
@@ -54,13 +54,6 @@ class CamelTestSupportOneContextForAllTest extends 
CamelTestSupport {
         //don't stop
     }
 
-    @Override
-    protected void doSetUp() throws Exception {
-        if (context == null) {
-            super.doSetUp();
-        }
-    }
-
     @Test
     @Order(1)
     void initContextTest() throws Exception {

Reply via email to