You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zh...@apache.org on 2023/03/19 05:18:24 UTC

[camel] branch camel-3.14.x updated (5bd4f3c304a -> 476f40798e1)

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

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


 discard 5bd4f3c304a CAMEL-19150: camel-olingo4 - Fix missing olingo4 endpoint property names (#9570)
     new 15828b25ce3 CAMEL-19150: camel-olingo4 - Fix missing olingo4 endpoint property names (#9570)
     new 476f40798e1 Fix CS

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5bd4f3c304a)
            \
             N -- N -- N   refs/heads/camel-3.14.x (476f40798e1)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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:
 .../java/org/apache/camel/component/olingo4/Olingo4RouteTest.java     | 4 +++-
 .../src/test/java/org/apache/camel/processor/SagaTimeoutTest.java     | 2 +-
 .../src/main/java/org/apache/camel/support/CamelContextHelper.java    | 3 +--
 3 files changed, 5 insertions(+), 4 deletions(-)


[camel] 02/02: Fix CS

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

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

commit 476f40798e1bd8bd97f101ed65bd1be6a4a2495d
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Sun Mar 19 13:17:23 2023 +0800

    Fix CS
---
 .../src/test/java/org/apache/camel/processor/SagaTimeoutTest.java      | 2 +-
 .../src/main/java/org/apache/camel/support/CamelContextHelper.java     | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SagaTimeoutTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SagaTimeoutTest.java
index 03d0ba6936c..29c085f501b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SagaTimeoutTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SagaTimeoutTest.java
@@ -85,7 +85,7 @@ public class SagaTimeoutTest extends ContextTestSupport {
         CamelExecutionException ex = assertThrows(CamelExecutionException.class,
                 () -> {
                     template.sendBody("direct:saga-multi-participants", "Hello");
-            });
+                });
 
         assertEquals("Cannot begin: status is COMPENSATED", ex.getCause().getMessage());
         end.assertIsSatisfied();
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/CamelContextHelper.java b/core/camel-support/src/main/java/org/apache/camel/support/CamelContextHelper.java
index c73b9c4bc98..bd93ff78c29 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/CamelContextHelper.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/CamelContextHelper.java
@@ -343,8 +343,7 @@ public final class CamelContextHelper {
      * Gets the maximum simple cache size.
      * <p/>
      * Will use the property set on CamelContext with the key {@link Exchange#MAXIMUM_SIMPLE_CACHE_SIZE}. If no property
-     * has been set, then it will fallback to return a size of 1000.
-     * Use value of 0 or negative to disable the cache.
+     * has been set, then it will fallback to return a size of 1000. Use value of 0 or negative to disable the cache.
      *
      * @param  camelContext             the camel context
      * @return                          the maximum cache size


[camel] 01/02: CAMEL-19150: camel-olingo4 - Fix missing olingo4 endpoint property names (#9570)

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

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

commit 15828b25ce3cd1c98ee87f9406db20b0958d1b54
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Sat Mar 18 21:11:48 2023 +0800

    CAMEL-19150: camel-olingo4 - Fix missing olingo4 endpoint property names (#9570)
---
 .../camel/component/olingo4/Olingo4Endpoint.java   |  3 ++-
 .../camel/component/olingo4/Olingo4RouteTest.java  | 22 +++++++++++++++++++---
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
index bf7c6b2bdd8..dde67280861 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java
@@ -167,7 +167,8 @@ public class Olingo4Endpoint extends AbstractApiEndpoint<Olingo4ApiName, Olingo4
 
     @Override
     protected void afterConfigureProperties() {
-        olingo4endpointPropertyNames = new HashSet<>(getEndpointPropertyNames());
+        olingo4endpointPropertyNames
+                = new HashSet<>(getPropertiesHelper().getValidEndpointProperties(getCamelContext(), configuration));
         olingo4endpointPropertyNames.add(EDM_PROPERTY);
         olingo4endpointPropertyNames.add(ENDPOINT_HTTP_HEADERS_PROPERTY);
         olingo4endpointPropertyNames.add(SERVICE_URI_PROPERTY);
diff --git a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4RouteTest.java b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4RouteTest.java
index e958ec901a4..4298da2e343 100644
--- a/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4RouteTest.java
+++ b/components/camel-olingo4/camel-olingo4-component/src/test/java/org/apache/camel/component/olingo4/Olingo4RouteTest.java
@@ -16,6 +16,9 @@
  */
 package org.apache.camel.component.olingo4;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit5.CamelTestSupport;
@@ -29,18 +32,31 @@ public class Olingo4RouteTest extends CamelTestSupport {
     protected static final String TEST_SERVICE_BASE_URL = "http://services.odata.org/TripPinRESTierService";
 
     @SuppressWarnings("unchecked")
-    protected <T> T requestBody(String endpoint, Object body) throws CamelExecutionException {
-        return (T) template().requestBody(endpoint, body);
+    protected <T> T requestBody(String endpoint, Object body, Map<String, Object> headers) throws CamelExecutionException {
+        return (T) template().requestBodyAndHeaders(endpoint, body, headers);
     }
 
     @Test
     public void testRead() throws Exception {
         // Read entity set of the People object
-        final ClientEntitySet entities = (ClientEntitySet) requestBody("direct:readentities", null);
+        final ClientEntitySet entities = (ClientEntitySet) requestBody("direct:readentities", null, null);
         assertNotNull(entities);
         assertEquals(20, entities.getEntities().size());
     }
 
+    @Test
+    public void testReadWithQueryParams() {
+        final Map<String, Object> headers = new HashMap<>();
+        final Map<String, String> queryParams = new HashMap<>();
+        queryParams.put("$top", "5");
+        headers.put("CamelOlingo4.queryParams", queryParams);
+
+        // Read entity set of the People object
+        final ClientEntitySet entities = (ClientEntitySet) requestBody("direct:readentities", null, headers);
+        assertNotNull(entities);
+        assertEquals(5, entities.getEntities().size());
+    }
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {