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 2023/08/07 16:49:30 UTC

[camel] branch camel-3.x updated (78055afd0ef -> 1e9d2fc833f)

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

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


    from 78055afd0ef (chores) camel-mock: avoid costly boxing/unboxing operations for integer operations (#11020)
     new 8405bc47be3 (chores) camel-jcr: try reusing forks to reduce test duration
     new 1e9d2fc833f (chores) camel-jcr: avoid recreating the repository for every single test (#11011)

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:
 components/camel-jcr/pom.xml                                          | 2 +-
 .../src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java | 4 +---
 .../test/java/org/apache/camel/component/jcr/JcrRouteTestSupport.java | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)


[camel] 01/02: (chores) camel-jcr: try reusing forks to reduce test duration

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8405bc47be3355e497dd70d340e3091ebc18f424
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Aug 7 15:58:46 2023 +0200

    (chores) camel-jcr: try reusing forks to reduce test duration
---
 components/camel-jcr/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-jcr/pom.xml b/components/camel-jcr/pom.xml
index eb7dead6e7f..e5db76d9673 100644
--- a/components/camel-jcr/pom.xml
+++ b/components/camel-jcr/pom.xml
@@ -80,7 +80,7 @@
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
                     <forkCount>1</forkCount>
-                    <reuseForks>false</reuseForks>
+                    <reuseForks>true</reuseForks>
                 </configuration>
             </plugin>
         </plugins>


[camel] 02/02: (chores) camel-jcr: avoid recreating the repository for every single test (#11011)

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1e9d2fc833f4c26ef468dc02e46fb36edb39676a
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Sun Aug 6 10:04:00 2023 +0200

    (chores) camel-jcr: avoid recreating the repository for every single test (#11011)
    
    Signed-off-by: Otavio R. Piske <an...@gmail.com>
---
 .../src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java | 4 +---
 .../test/java/org/apache/camel/component/jcr/JcrRouteTestSupport.java | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
index 0c92e37aade..dd65fe36398 100644
--- a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
+++ b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
@@ -44,7 +44,7 @@ public abstract class JcrAuthTestBase extends CamelTestSupport {
 
     protected static final String REPO_PATH = "target/repository";
 
-    private Repository repository;
+    private static Repository repository = new TransientRepository(new File(REPO_PATH));
 
     @Override
     @BeforeEach
@@ -55,8 +55,6 @@ public abstract class JcrAuthTestBase extends CamelTestSupport {
 
     @Override
     protected void bindToRegistry(Registry registry) throws Exception {
-        repository = new TransientRepository(new File(REPO_PATH));
-
         // set up a user to authenticate
         SessionImpl session = (SessionImpl) repository
                 .login(new SimpleCredentials("admin", "admin".toCharArray()));
diff --git a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTestSupport.java b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTestSupport.java
index b116f002de5..75f4775fd4a 100644
--- a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTestSupport.java
+++ b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrRouteTestSupport.java
@@ -40,7 +40,7 @@ public abstract class JcrRouteTestSupport extends CamelTestSupport {
 
     protected static final String REPO_PATH = "target/repository-simple-security";
 
-    private Repository repository;
+    private static final Repository repository = new TransientRepository(CONFIG_FILE, REPO_PATH);
 
     @Override
     @BeforeEach
@@ -64,7 +64,6 @@ public abstract class JcrRouteTestSupport extends CamelTestSupport {
             throw new FileNotFoundException("Missing config file: " + config.getPath());
         }
 
-        repository = new TransientRepository(CONFIG_FILE, REPO_PATH);
         registry.bind("repository", repository);
     }
 }