You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/06/18 11:27:34 UTC

(camel) branch main updated (a979b39ab24 -> 84df9a0a866)

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

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


    from a979b39ab24 CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS SQS
     new e7ac9edaa6b CAMEL-20838: do not use overrides when JUnit's annotations suffice (camel-sql)
     new 84df9a0a866 CAMEL-20838: do not use overrides when JUnit's annotations suffice (camel-leveldb)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...ngAggregateRecoverWithRedeliveryPolicyTest.java |  6 +++---
 .../camel/component/sql/SqlProducerInBodyTest.java | 22 ++++++++--------------
 2 files changed, 11 insertions(+), 17 deletions(-)


(camel) 02/02: CAMEL-20838: do not use overrides when JUnit's annotations suffice (camel-leveldb)

Posted by or...@apache.org.
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 84df9a0a866297898c47b5d19bd33411cec39358
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Jun 17 11:01:14 2024 +0200

    CAMEL-20838: do not use overrides when JUnit's annotations suffice (camel-leveldb)
---
 .../LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java
index 99138696693..ae66bc184a5 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java
@@ -24,6 +24,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledOnOs;
 import org.junit.jupiter.api.condition.OS;
@@ -43,9 +44,8 @@ public class LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest extends Camel
                 "org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.xml");
     }
 
-    @Override
-    public void doPreSetup() throws Exception {
-        super.doPreSetup();
+    @BeforeEach
+    public void cleanupDirectory() {
         deleteDirectory("target/data");
     }
 


(camel) 01/02: CAMEL-20838: do not use overrides when JUnit's annotations suffice (camel-sql)

Posted by or...@apache.org.
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 e7ac9edaa6b98dbc50f11998afd6168a82853245
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Jun 17 10:55:47 2024 +0200

    CAMEL-20838: do not use overrides when JUnit's annotations suffice (camel-sql)
---
 .../camel/component/sql/SqlProducerInBodyTest.java | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerInBodyTest.java b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerInBodyTest.java
index 899aedaf8a2..98ac9d2488b 100644
--- a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerInBodyTest.java
+++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerInBodyTest.java
@@ -23,8 +23,8 @@ import java.util.Map;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase;
 import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
@@ -34,24 +34,18 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SqlProducerInBodyTest extends CamelTestSupport {
 
-    EmbeddedDatabase db;
+    static EmbeddedDatabase db;
 
-    @Override
-    @BeforeEach
-    public void setUp() throws Exception {
+    @BeforeAll
+    public static void setupDatabase() {
         db = new EmbeddedDatabaseBuilder()
-                .setName(getClass().getSimpleName())
+                .setName(SqlProducerInBodyTest.class.getSimpleName())
                 .setType(EmbeddedDatabaseType.H2)
                 .addScript("sql/createAndPopulateDatabase.sql").build();
-
-        super.setUp();
     }
 
-    @Override
-    @AfterEach
-    public void tearDown() throws Exception {
-        super.tearDown();
-
+    @AfterAll
+    public static void cleanupDatabase() {
         if (db != null) {
             db.shutdown();
         }