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
The following commit(s) were added to refs/heads/main by this push: new 002b8c4 camel-salesforce: Fix standalone tests 002b8c4 is described below commit 002b8c46584756ca9c1ae69df63d0e324db1a80e Author: Jeremy Ross <jeremy.g.r...@gmail.com> AuthorDate: Mon Sep 20 14:07:07 2021 -0500 camel-salesforce: Fix standalone tests They should actually run standalone. Probably stopped working after JUnit 5 upgrade. --- .../camel-salesforce-component/pom.xml | 4 ++-- .../salesforce/BulkApiIntegrationTest.java | 3 ++- .../ChangeEventsConsumerIntegrationTest.java | 3 ++- .../PlatformEventsConsumerIntegrationTest.java | 3 ++- .../camel/component/salesforce/RawPayloadTest.java | 3 ++- .../salesforce/RecentIntegrationTest.java | 3 ++- .../salesforce/RestApiIntegrationTest.java | 3 ++- .../camel/component/salesforce/Standalone.java | 27 ---------------------- .../salesforce/StreamingApiIntegrationTest.java | 2 ++ 9 files changed, 16 insertions(+), 35 deletions(-) diff --git a/components/camel-salesforce/camel-salesforce-component/pom.xml b/components/camel-salesforce/camel-salesforce-component/pom.xml index fd2e18b..2b2c45c 100644 --- a/components/camel-salesforce/camel-salesforce-component/pom.xml +++ b/components/camel-salesforce/camel-salesforce-component/pom.xml @@ -424,7 +424,7 @@ https://developer.salesforce.com/page/Force.com_Migration_Tool]]></message> <includes> <include>**/*IntegrationTest.java</include> </includes> - <excludedGroups>org.apache.camel.component.salesforce.Standalone</excludedGroups> + <excludedGroups>standalone</excludedGroups> </configuration> </execution> <execution> @@ -439,7 +439,7 @@ https://developer.salesforce.com/page/Force.com_Migration_Tool]]></message> <includes> <include>**/*IntegrationTest.java</include> </includes> - <groups>org.apache.camel.component.salesforce.Standalone</groups> + <groups>standalone</groups> </configuration> </execution> </executions> diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiIntegrationTest.java index 8d24926..3e4fb04 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiIntegrationTest.java @@ -29,11 +29,12 @@ import org.eclipse.jetty.client.api.Request; import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.util.ssl.SslContextFactory; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; -@Standalone +@Tag("standalone") public class BulkApiIntegrationTest extends AbstractBulkApiTestBase { @Test diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ChangeEventsConsumerIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ChangeEventsConsumerIntegrationTest.java index 40aab32..9c3cd8a 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ChangeEventsConsumerIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ChangeEventsConsumerIntegrationTest.java @@ -27,6 +27,7 @@ import org.apache.camel.component.salesforce.api.dto.CreateSObjectResult; import org.apache.camel.component.salesforce.dto.generated.Account; import org.assertj.core.api.Assertions; import org.awaitility.Awaitility; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -37,7 +38,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; * During integration tests setup, Salesforce has been configured to fire change events for Account objects. This test * merely uses some API calls to trigger some change events, and then perform assertion on the received events. */ -@Standalone +@Tag("standalone") public class ChangeEventsConsumerIntegrationTest extends AbstractSalesforceTestBase { private static final String ACCOUNT_NAME = "ChangeEventsConsumerIntegrationTest-TestAccount"; diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/PlatformEventsConsumerIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/PlatformEventsConsumerIntegrationTest.java index d3d0624..f8092c9 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/PlatformEventsConsumerIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/PlatformEventsConsumerIntegrationTest.java @@ -26,11 +26,12 @@ import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.salesforce.api.dto.PlatformEvent; import org.assertj.core.api.Assertions; import org.awaitility.Awaitility; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.entry; -@Standalone +@Tag("standalone") public class PlatformEventsConsumerIntegrationTest extends AbstractSalesforceTestBase { @Test diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java index a60c7dc..0793765 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java @@ -37,11 +37,12 @@ import org.eclipse.jetty.http.HttpHeader; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Tag; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -@Standalone +@Tag("standalone") @Parameterized public class RawPayloadTest extends AbstractSalesforceTestBase { diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RecentIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RecentIntegrationTest.java index e6259ca..31c802d 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RecentIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RecentIntegrationTest.java @@ -27,11 +27,12 @@ import org.apache.camel.component.salesforce.api.dto.RecentItem; import org.apache.camel.component.salesforce.dto.generated.Account; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import static org.apache.camel.test.junit5.TestSupport.assertListSize; -@Standalone +@Tag("standalone") public class RecentIntegrationTest extends AbstractSalesforceTestBase { public static class Accounts extends AbstractQueryRecordsBase { diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java index c686c1c..591f420 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java @@ -64,6 +64,7 @@ import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Tag; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -72,7 +73,7 @@ import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; -@Standalone +@Tag("standalone") @Parameterized public class RestApiIntegrationTest extends AbstractSalesforceTestBase { diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java deleted file mode 100644 index 8565d83..0000000 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.salesforce; - -import org.junit.jupiter.api.Tag; - -/** - * JUnit group tag interface for tests that need to be run standalone, i.e. not in parallel with other tests. - */ -@Tag("standalone") -public @interface Standalone { - // tag interface -} diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java index 72e5137..a4c35b2 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java +++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java @@ -24,6 +24,7 @@ import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.component.salesforce.api.dto.UpsertSObjectResult; import org.apache.camel.component.salesforce.dto.generated.Merchandise__c; import org.apache.camel.component.salesforce.internal.dto.QueryRecordsPushTopic; +import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -31,6 +32,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; +@Tag("standalone") public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase { @Test