This is an automated email from the ASF dual-hosted git repository. jeremyross pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 81d65747a550dbad364a1a862527277c74f72d60 Author: Freeman Fang <[email protected]> AuthorDate: Wed Apr 13 16:45:08 2022 -0400 [CAMEL-17954]fix integration tests failure --- .../camel/component/salesforce/CompoundTypesIntegrationTest.java | 5 +++-- .../apache/camel/component/salesforce/HttpProxyIntegrationTest.java | 5 +++-- .../it/resources/CamelSalesforceIntegrationTests.connectedApp | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompoundTypesIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompoundTypesIntegrationTest.java index a1f25fd0c9b..b5028a0e64f 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompoundTypesIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompoundTypesIntegrationTest.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static org.junit.Assert.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; /** @@ -90,7 +90,8 @@ public class CompoundTypesIntegrationTest extends AbstractSalesforceTestBase { } finally { // delete the test SObject - assertNull(template().requestBody("direct:deleteSObject" + suffix, result.getId())); + String id = (String) template().requestBody("direct:deleteSObject" + suffix, result.getId()); + assertEquals(id, result.getId()); LOG.debug("Delete successful"); } } diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/HttpProxyIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/HttpProxyIntegrationTest.java index 116007bb418..555379373bf 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/HttpProxyIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/HttpProxyIntegrationTest.java @@ -38,6 +38,7 @@ import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.util.B64Code; import org.eclipse.jetty.util.StringUtil; +import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -149,8 +150,8 @@ public class HttpProxyIntegrationTest extends AbstractSalesforceTestBase { configurationMethod.accept(salesforce); } - @Override - public void cleanupResources() throws Exception { + @AfterAll + public static void cleanup() throws Exception { // stop the proxy server after component LOG.info("Stopping proxy server..."); server.stop(); diff --git a/components/camel-salesforce/it/resources/CamelSalesforceIntegrationTests.connectedApp b/components/camel-salesforce/it/resources/CamelSalesforceIntegrationTests.connectedApp index dc1ffd36fc2..ae4f9c265d5 100644 --- a/components/camel-salesforce/it/resources/CamelSalesforceIntegrationTests.connectedApp +++ b/components/camel-salesforce/it/resources/CamelSalesforceIntegrationTests.connectedApp @@ -21,8 +21,8 @@ <oauthConfig> <callbackUrl>https://login.salesforce.com/services/oauth2/success</callbackUrl> <certificate>MIIC1TCCAb2gAwIBAgIEM3ZMGjANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDEw9TYWxlc2ZvcmNlIHRlc3QwIBcNMTcwMzE0MjIxMjU0WhgPMjExNzAyMTgyMjEyNTRaMBoxGDAWBgNVBAMTD1NhbGVzZm9yY2UgdGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbZinVCZerzZvyyQlfE6nMpEQRfVsjpcfT01UTG/bwzWorP7YRpGkDW7Q4eu6IPrHtohkhM3JtsSVka5jfS1iEguMXLdNkEyMjMiBrWJeyGfcISF1yazgqLxxwcwGjMn3C9xV5tBxiRSqtMrV1iRx3fxmLue1UnZjSyUaG+Vi+FcKxqre5ixApeDCZHLONxBy3mjWK4GIeBBbUqQqy3LNrT6B34WdNX8vTslpTKOlmLyycEI/Rx+A4lNaultrJHdnRhGBr [...] - <consumerKey>${salesforce.client.id}</consumerKey> - <consumerSecret>${salesforce.client.secret}</consumerSecret> + <!--consumerKey>${salesforce.client.id}</consumerKey> + <consumerSecret>${salesforce.client.secret}</consumerSecret--> <scopes>Api</scopes> <scopes>RefreshToken</scopes> </oauthConfig>
