You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/06/19 09:14:37 UTC

[camel-spring-boot] branch fix-tests created (now 3c3d9bde902)

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

nfilotto pushed a change to branch fix-tests
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


      at 3c3d9bde902 camel-salesforce - Add missing test dependency and id

This branch includes the following new commits:

     new 3c3d9bde902 camel-salesforce - Add missing test dependency and id

The 1 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.



[camel-spring-boot] 01/01: camel-salesforce - Add missing test dependency and id

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

nfilotto pushed a commit to branch fix-tests
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 3c3d9bde90269ea93436903f5e683d30c7788b4a
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Mon Jun 19 11:14:13 2023 +0200

    camel-salesforce - Add missing test dependency and id
---
 components-starter/camel-salesforce-starter/pom.xml            |  7 +++++++
 .../camel/component/salesforce/springboot/RawPayloadTest.java  | 10 ++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/components-starter/camel-salesforce-starter/pom.xml b/components-starter/camel-salesforce-starter/pom.xml
index 2da56d00571..fb15835d647 100644
--- a/components-starter/camel-salesforce-starter/pom.xml
+++ b/components-starter/camel-salesforce-starter/pom.xml
@@ -45,6 +45,13 @@
       <version>${okclient-version}</version>
       <scope>test</scope>
     </dependency>
+    <!-- forcing okhttp v3.x related to https://issues.apache.org/jira/browse/CAMEL-16336 -->
+    <dependency>
+      <groupId>com.squareup.okhttp3</groupId>
+      <artifactId>okhttp</artifactId>
+      <version>${squareup-okhttp-version}</version>
+      <scope>test</scope>
+    </dependency>
     <!--START OF GENERATED CODE-->
     <dependency>
       <groupId>org.apache.camel.springboot</groupId>
diff --git a/components-starter/camel-salesforce-starter/src/test/java/org/apache/camel/component/salesforce/springboot/RawPayloadTest.java b/components-starter/camel-salesforce-starter/src/test/java/org/apache/camel/component/salesforce/springboot/RawPayloadTest.java
index 16b1c231bdc..f19fa69d8af 100644
--- a/components-starter/camel-salesforce-starter/src/test/java/org/apache/camel/component/salesforce/springboot/RawPayloadTest.java
+++ b/components-starter/camel-salesforce-starter/src/test/java/org/apache/camel/component/salesforce/springboot/RawPayloadTest.java
@@ -127,10 +127,16 @@ public class RawPayloadTest extends AbstractSalesforceTestBase {
 
         server.setDispatcher(new Dispatcher() {
             @Override
-            public MockResponse dispatch(RecordedRequest recordedRequest) throws InterruptedException {
+            public MockResponse dispatch(RecordedRequest recordedRequest) {
                 if (recordedRequest.getPath().equals(OAUTH2_TOKEN_PATH)) {
                     return new MockResponse().setResponseCode(200)
-                            .setBody("{ \"access_token\": \"mock_token\", \"instance_url\": \"" + loginUrl + "\"}");
+                            .setBody(String.format("""
+                             {
+                                "access_token": "mock_token",
+                                "instance_url": "%s",
+                                "id": "https://login.salesforce.com/id/00D4100000xxxxxxxx/0054100000xxxxxxxx"
+                             }
+                             """, loginUrl));
                 } else {
                     return new MockResponse().setResponseCode(200)
                             .setHeader(HttpHeader.CONTENT_TYPE.toString(),