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 2022/08/05 17:38:12 UTC
[camel] 04/04: OS assumptions replaced with @DisabledOnOs there possible
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 4f93fb41b99ac2f5865f83eb89d06b5036b4e313
Author: Vladimir V. Bychkov <gi...@bychkov.name>
AuthorDate: Fri Aug 5 16:12:03 2022 +0200
OS assumptions replaced with @DisabledOnOs there possible
---
.../validator/BeanValidatorConfigurationTest.java | 3 +--
.../bean/validator/BeanValidatorRouteTest.java | 9 +-------
.../validator/ValidatorFactoryAutowireTest.java | 2 +-
.../validator/ValidatorFactoryRegistryTest.java | 2 +-
.../bean/validator/ValidatorFactoryTest.java | 2 +-
.../camel/component/jetty/HttpsAsyncRouteTest.java | 17 +++------------
.../netty/http/ManagedNettyEndpointTest.java | 8 +++----
.../netty/http/NettyHttpSuspendResume503Test.java | 8 +++----
.../netty/http/NettyHttpSuspendResumeTest.java | 8 +++----
.../component/quartz/QuartzManagementTest.java | 8 +++----
...pringQuartzPersistentStoreRestartRouteTest.java | 9 +++-----
.../salesforce/CompositeApiIntegrationTest.java | 3 ++-
.../ManagedEndpointInjectRefEndpointTest.java | 6 ------
.../spring/management/ManagedRefEndpointTest.java | 6 ------
.../component/xmlsecurity/ECDSASignatureTest.java | 12 +++++------
.../xmlsecurity/EncryptionAlgorithmTest.java | 25 +++++++++++-----------
.../component/xmpp/XmppRobustConnectionTest.java | 10 +++------
.../camel/zipkin/ManagedZipkinSimpleRouteTest.java | 9 +++-----
.../file/FileProducerChmodOptionTest.java | 12 +++--------
.../file/FileProducerDirectoryChmodOptionTest.java | 10 +++------
.../component/file/FileProducerExpressionTest.java | 7 +++---
.../file/FileProducerFileExistTryRenameTest.java | 8 +++----
.../FileAsyncStressFileDropperManualTest.java | 8 +++----
.../file/stress/FileAsyncStressManualTest.java | 10 +++------
.../stress/FileAsyncStressManuallyManualTest.java | 8 +++----
.../FileConsumerPollManyFilesManualTest.java | 9 +++-----
.../camel/impl/StopRouteAbortAfterTimeoutTest.java | 13 +++--------
.../SplitterWithScannerIoExceptionTest.java | 4 +++-
.../apache/camel/processor/ThrottlerDslTest.java | 11 +++-------
.../camel/processor/ThrottlerMethodCallTest.java | 11 +++-------
.../org/apache/camel/processor/ThrottlerTest.java | 23 +++-----------------
.../processor/ThrottlerThreadPoolProfileTest.java | 12 +++--------
.../management/ManagedPooledExchangeTest.java | 4 ----
.../management/ManagedRouteGetPropertiesTest.java | 3 ---
.../ManagedRouteStopWithAbortAfterTimeoutTest.java | 11 +---------
.../camel/management/ManagedThrottlerTest.java | 16 +++-----------
.../camel/management/ManagementTestSupport.java | 3 ---
...ringFileAntPathMatcherRemoteFileFilterTest.java | 2 +-
38 files changed, 96 insertions(+), 236 deletions(-)
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorConfigurationTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorConfigurationTest.java
index 35b5069a885..16f741319b2 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorConfigurationTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorConfigurationTest.java
@@ -37,6 +37,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.condition.OS.AIX;
+@DisabledOnOs(AIX)
public class BeanValidatorConfigurationTest extends CamelTestSupport {
@BindToRegistry("myMessageInterpolator")
@@ -56,14 +57,12 @@ public class BeanValidatorConfigurationTest extends CamelTestSupport {
super.setUp();
}
- @DisabledOnOs(AIX)
@Test
void configureWithDefaults() {
BeanValidatorEndpoint endpoint = context.getEndpoint("bean-validator://x", BeanValidatorEndpoint.class);
assertNull(endpoint.getGroup());
}
- @DisabledOnOs(AIX)
@Test
void configureBeanValidator() {
BeanValidatorEndpoint endpoint = context
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
index b4c92144e26..d0fb2db3bef 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
@@ -42,6 +42,7 @@ import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.condition.OS.AIX;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@DisabledOnOs(AIX)
class BeanValidatorRouteTest extends CamelTestSupport {
private Locale origLocale;
@@ -56,7 +57,6 @@ class BeanValidatorRouteTest extends CamelTestSupport {
Locale.setDefault(origLocale);
}
- @DisabledOnOs(AIX)
@ParameterizedTest
@MethodSource("provideValidCars")
void validateShouldSuccessWithImpliciteDefaultGroup(Object cars) {
@@ -70,7 +70,6 @@ class BeanValidatorRouteTest extends CamelTestSupport {
assertNotNull(exchange);
}
- @DisabledOnOs(AIX)
@ParameterizedTest
@MethodSource("provideValidCars")
void validateShouldSuccessWithExpliciteDefaultGroup(Object cars) {
@@ -84,7 +83,6 @@ class BeanValidatorRouteTest extends CamelTestSupport {
assertNotNull(exchange);
}
- @DisabledOnOs(AIX)
@ParameterizedTest
@MethodSource("provideInvalidCarsWithoutLicensePlate")
void validateShouldFailWithImpliciteDefaultGroup(Object cars, int numberOfViolations) {
@@ -119,7 +117,6 @@ class BeanValidatorRouteTest extends CamelTestSupport {
assertNotNull(exchange);
}
- @DisabledOnOs(AIX)
@ParameterizedTest
@MethodSource("provideInvalidCarsWithoutLicensePlate")
void validateShouldFailWithExpliciteDefaultGroup(Object cars, int numberOfViolations) {
@@ -154,7 +151,6 @@ class BeanValidatorRouteTest extends CamelTestSupport {
assertNotNull(exchange);
}
- @DisabledOnOs(AIX)
@ParameterizedTest
@MethodSource("provideInvalidCarsWithShortLicensePlate")
void validateShouldFailWithOptionalChecksGroup(Object cars, int numberOfViolations) {
@@ -189,7 +185,6 @@ class BeanValidatorRouteTest extends CamelTestSupport {
assertNotNull(exchange);
}
- @DisabledOnOs(AIX)
@ParameterizedTest
@MethodSource("provideInvalidCarsWithoutManufacturer")
void validateShouldFailWithOrderedChecksGroup(Object cars, int numberOfViolations) {
@@ -243,7 +238,6 @@ class BeanValidatorRouteTest extends CamelTestSupport {
assertNotNull(exchange);
}
- @DisabledOnOs(AIX)
@ParameterizedTest
@MethodSource("provideCarsWithRedefinedDefaultGroup")
void validateShouldSuccessWithRedefinedDefaultGroup(Object cars) {
@@ -259,7 +253,6 @@ class BeanValidatorRouteTest extends CamelTestSupport {
assertNotNull(exchange);
}
- @DisabledOnOs(AIX)
@ParameterizedTest
@MethodSource("provideCarsWithRedefinedDefaultGroupAndShortLicencePlate")
void validateShouldFailWithRedefinedDefaultGroup(Object cars, int numberOfViolations) {
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryAutowireTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryAutowireTest.java
index de09a08481d..161a5938b36 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryAutowireTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryAutowireTest.java
@@ -29,6 +29,7 @@ import org.junit.jupiter.api.condition.DisabledOnOs;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.condition.OS.AIX;
+@DisabledOnOs(AIX)
public class ValidatorFactoryAutowireTest extends CamelTestSupport {
@BindToRegistry("myValidatorFactory")
@@ -45,7 +46,6 @@ public class ValidatorFactoryAutowireTest extends CamelTestSupport {
super.setUp();
}
- @DisabledOnOs(AIX)
@Test
void configureValidatorFactoryAutowired() throws Exception {
BeanValidatorEndpoint endpoint
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryRegistryTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryRegistryTest.java
index 965de434f5e..dc2808ba716 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryRegistryTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryRegistryTest.java
@@ -29,6 +29,7 @@ import org.junit.jupiter.api.condition.DisabledOnOs;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.condition.OS.AIX;
+@DisabledOnOs(AIX)
public class ValidatorFactoryRegistryTest extends CamelTestSupport {
@BindToRegistry("myValidatorFactory")
@@ -49,7 +50,6 @@ public class ValidatorFactoryRegistryTest extends CamelTestSupport {
super.setUp();
}
- @DisabledOnOs(AIX)
@Test
void configureValidatorFactoryFromRegistry() throws Exception {
BeanValidatorEndpoint endpoint
diff --git a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
index 4477de3d751..390717fabd9 100644
--- a/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
+++ b/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/ValidatorFactoryTest.java
@@ -24,9 +24,9 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.condition.OS.AIX;
+@DisabledOnOs(AIX)
public class ValidatorFactoryTest extends CamelTestSupport {
- @DisabledOnOs(AIX)
@Test
void configureValidatorFactory() throws Exception {
diff --git a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsAsyncRouteTest.java b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsAsyncRouteTest.java
index 22bc68cdfbc..46d9d489bc2 100644
--- a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsAsyncRouteTest.java
+++ b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpsAsyncRouteTest.java
@@ -36,19 +36,20 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import org.junit.jupiter.api.parallel.ResourceLock;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.apache.camel.component.jetty.BaseJettyTest.SSL_SYSPROPS;
-import static org.apache.camel.test.junit5.TestSupport.isPlatform;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
@ResourceLock(SSL_SYSPROPS)
+@DisabledOnOs(OS.WINDOWS)
public class HttpsAsyncRouteTest extends HttpsRouteTest {
private static final Logger LOG = LoggerFactory.getLogger(HttpsAsyncRouteTest.class);
@@ -94,9 +95,6 @@ public class HttpsAsyncRouteTest extends HttpsRouteTest {
@Override
@Test
public void testEndpoint() throws Exception {
- // these tests does not run well on Windows
- assumeFalse(isPlatform("windows"), "Test is not intended for windows");
-
MockEndpoint mockEndpointA = resolveMandatoryEndpoint("mock:a", MockEndpoint.class);
mockEndpointA.expectedBodiesReceived(expectedBody);
MockEndpoint mockEndpointB = resolveMandatoryEndpoint("mock:b", MockEndpoint.class);
@@ -123,9 +121,6 @@ public class HttpsAsyncRouteTest extends HttpsRouteTest {
@Override
@Test
public void testEndpointWithoutHttps() {
- // these tests does not run well on Windows
- assumeFalse(isPlatform("windows"), "Test is not intended for windows");
-
MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:a", MockEndpoint.class);
try {
template.sendBodyAndHeader("http://localhost:" + port1 + "/test", expectedBody, "Content-Type", "application/xml");
@@ -138,9 +133,6 @@ public class HttpsAsyncRouteTest extends HttpsRouteTest {
@Override
@Test
public void testHelloEndpoint() throws Exception {
- // these tests does not run well on Windows
- assumeFalse(isPlatform("windows"), "Test is not intended for windows");
-
ByteArrayOutputStream os = new ByteArrayOutputStream();
URL url = new URL("https://localhost:" + port1 + "/hello");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
@@ -160,9 +152,6 @@ public class HttpsAsyncRouteTest extends HttpsRouteTest {
@Override
@Test
public void testHelloEndpointWithoutHttps() throws Exception {
- // these tests does not run well on Windows
- assumeFalse(isPlatform("windows"), "Test is not intended for windows");
-
try {
new URL("http://localhost:" + port1 + "/hello").openStream();
fail("expected SocketException on use ot http");
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java
index 980b0c5e399..96b995a8663 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/ManagedNettyEndpointTest.java
@@ -25,11 +25,12 @@ import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
-import static org.apache.camel.test.junit5.TestSupport.isPlatform;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+@DisabledOnOs(OS.AIX)
public class ManagedNettyEndpointTest extends BaseNettyTest {
@Override
@@ -49,9 +50,6 @@ public class ManagedNettyEndpointTest extends BaseNettyTest {
@Test
public void testManagement() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
-
// should not add 10 endpoints
getMockEndpoint("mock:foo").expectedMessageCount(10);
for (int i = 0; i < 10; i++) {
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSuspendResume503Test.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSuspendResume503Test.java
index d329eb0bfc8..d76dc071689 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSuspendResume503Test.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSuspendResume503Test.java
@@ -20,24 +20,22 @@ import java.util.concurrent.TimeUnit;
import org.apache.camel.builder.RouteBuilder;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
-import static org.apache.camel.test.junit5.TestSupport.isPlatform;
import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+@DisabledOnOs(OS.WINDOWS)
public class NettyHttpSuspendResume503Test extends BaseNettyTest {
private String serverUri = "netty-http:http://localhost:" + getPort() + "/cool?disconnect=true";
@Test
public void testNettySuspendResume() throws Exception {
- // these tests does not run well on Windows
- assumeFalse(isPlatform("windows"));
-
context.getShutdownStrategy().setTimeout(50);
String reply = template.requestBody(serverUri, "World", String.class);
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSuspendResumeTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSuspendResumeTest.java
index 6aaebe1c959..729c06253b3 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSuspendResumeTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpSuspendResumeTest.java
@@ -20,24 +20,22 @@ import java.util.concurrent.TimeUnit;
import org.apache.camel.builder.RouteBuilder;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
-import static org.apache.camel.test.junit5.TestSupport.isPlatform;
import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+@DisabledOnOs(OS.WINDOWS)
public class NettyHttpSuspendResumeTest extends BaseNettyTest {
private String serverUri = "netty-http:http://localhost:" + getPort() + "/cool?disconnect=true&send503whenSuspended=false";
@Test
public void testNettySuspendResume() throws Exception {
- // these tests does not run well on Windows
- assumeFalse(isPlatform("windows"));
-
context.getShutdownStrategy().setTimeout(50);
String reply = template.requestBody(serverUri, "World", String.class);
diff --git a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java
index 19f566fc28a..39e4c5f5615 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzManagementTest.java
@@ -21,12 +21,13 @@ import javax.management.ObjectName;
import org.apache.camel.builder.RouteBuilder;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
-import static org.apache.camel.test.junit5.TestSupport.isPlatform;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+@DisabledOnOs(OS.AIX)
public class QuartzManagementTest extends BaseQuartzTest {
protected MBeanServer getMBeanServer() {
@@ -35,9 +36,6 @@ public class QuartzManagementTest extends BaseQuartzTest {
@Test
public void testQuartzRoute() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
-
getMockEndpoint("mock:result").expectedMessageCount(2);
assertMockEndpointsSatisfied();
diff --git a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartRouteTest.java b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartRouteTest.java
index 9743875a92e..33b2834a4f1 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartRouteTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzPersistentStoreRestartRouteTest.java
@@ -22,11 +22,11 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import org.springframework.context.support.AbstractXmlApplicationContext;
-import static org.apache.camel.test.junit5.TestSupport.isPlatform;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
-
+@DisabledOnOs(OS.AIX)
public class SpringQuartzPersistentStoreRestartRouteTest extends CamelSpringTestSupport {
@Override
@@ -36,9 +36,6 @@ public class SpringQuartzPersistentStoreRestartRouteTest extends CamelSpringTest
@Test
public void testQuartzPersistentStore() throws Exception {
- // skip testing on aix
- assumeFalse(isPlatform("aix"));
-
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMinimumMessageCount(2);
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiIntegrationTest.java
index d4339a212f9..b86e4c15367 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiIntegrationTest.java
@@ -208,7 +208,8 @@ public class CompositeApiIntegrationTest extends AbstractSalesforceTestBase {
@Test
public void shouldSupportRelatedObjectRetrieval() {
- assumeFalse(Version.create(version).compareTo(Version.create("36.0")) < 0, "Version must be greater than or equal to 36.0");
+ assumeFalse(Version.create(version).compareTo(Version.create("36.0")) < 0,
+ "Version must be greater than or equal to 36.0");
final SObjectComposite composite = new SObjectComposite("36.0", true);
composite.addGetRelated("Account", accountId, "CreatedBy", "GetRelatedAccountReferenceId");
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/management/ManagedEndpointInjectRefEndpointTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/management/ManagedEndpointInjectRefEndpointTest.java
index b3e210d9937..20b8e624fbc 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/management/ManagedEndpointInjectRefEndpointTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/management/ManagedEndpointInjectRefEndpointTest.java
@@ -50,12 +50,6 @@ public class ManagedEndpointInjectRefEndpointTest extends SpringTestSupport {
return context.getManagementStrategy().getManagementAgent().getMBeanServer();
}
- @Override
- protected boolean canRunOnThisPlatform() {
- // JMX tests dont work well on AIX CI servers (hangs them)
- return !isPlatform("aix");
- }
-
@Test
public void testRef() throws Exception {
// fire a message to get it running
diff --git a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/management/ManagedRefEndpointTest.java b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/management/ManagedRefEndpointTest.java
index 8ee495be4d9..95ce526001d 100644
--- a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/management/ManagedRefEndpointTest.java
+++ b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/management/ManagedRefEndpointTest.java
@@ -49,12 +49,6 @@ public class ManagedRefEndpointTest extends SpringTestSupport {
return context.getManagementStrategy().getManagementAgent().getMBeanServer();
}
- @Override
- protected boolean canRunOnThisPlatform() {
- // JMX tests dont work well on AIX CI servers (hangs them)
- return !isPlatform("aix");
- }
-
@Test
public void testRef() throws Exception {
// fire a message to get it running
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/ECDSASignatureTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/ECDSASignatureTest.java
index 9611f3ae912..b7ee197ed65 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/ECDSASignatureTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/component/xmlsecurity/ECDSASignatureTest.java
@@ -179,7 +179,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
@Test
public void testECDSASHA1() throws Exception {
- assumeTrue(canTest, "Test preconditions failed: canTest="+canTest);
+ assumeTrue(canTest, "Test preconditions failed: canTest=" + canTest);
setupMock();
sendBody("direct:ecdsa_sha1", payload);
assertMockEndpointsSatisfied();
@@ -187,7 +187,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
@Test
public void testECDSASHA224() throws Exception {
- assumeTrue(canTest, "Test preconditions failed: canTest="+canTest);
+ assumeTrue(canTest, "Test preconditions failed: canTest=" + canTest);
setupMock();
sendBody("direct:ecdsa_sha224", payload);
assertMockEndpointsSatisfied();
@@ -195,7 +195,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
@Test
public void testECDSASHA256() throws Exception {
- assumeTrue(canTest, "Test preconditions failed: canTest="+canTest);
+ assumeTrue(canTest, "Test preconditions failed: canTest=" + canTest);
setupMock();
sendBody("direct:ecdsa_sha256", payload);
assertMockEndpointsSatisfied();
@@ -203,7 +203,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
@Test
public void testECDSASHA384() throws Exception {
- assumeTrue(canTest, "Test preconditions failed: canTest="+canTest);
+ assumeTrue(canTest, "Test preconditions failed: canTest=" + canTest);
setupMock();
sendBody("direct:ecdsa_sha384", payload);
assertMockEndpointsSatisfied();
@@ -211,7 +211,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
@Test
public void testECDSASHA512() throws Exception {
- assumeTrue(canTest, "Test preconditions failed: canTest="+canTest);
+ assumeTrue(canTest, "Test preconditions failed: canTest=" + canTest);
setupMock();
sendBody("direct:ecdsa_sha512", payload);
assertMockEndpointsSatisfied();
@@ -219,7 +219,7 @@ public class ECDSASignatureTest extends CamelTestSupport {
@Test
public void testECDSARIPEMD160() throws Exception {
- assumeTrue(canTest, "Test preconditions failed: canTest="+canTest);
+ assumeTrue(canTest, "Test preconditions failed: canTest=" + canTest);
setupMock();
sendBody("direct:ecdsa_ripemd160", payload);
assertMockEndpointsSatisfied();
diff --git a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/EncryptionAlgorithmTest.java b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/EncryptionAlgorithmTest.java
index d4a7e377f75..e646877175a 100644
--- a/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/EncryptionAlgorithmTest.java
+++ b/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/EncryptionAlgorithmTest.java
@@ -115,7 +115,8 @@ public class EncryptionAlgorithmTest extends CamelTestSupport {
@Test
public void testAES192() throws Exception {
- assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED, "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED="+TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
+ assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED,
+ "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED=" + TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
// Set up the Key
KeyGenerator keygen = KeyGenerator.getInstance("AES");
@@ -141,7 +142,8 @@ public class EncryptionAlgorithmTest extends CamelTestSupport {
@Test
public void testAES192GCM() throws Exception {
- assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED, "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED="+TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
+ assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED,
+ "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED=" + TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
// Set up the Key
KeyGenerator keygen = KeyGenerator.getInstance("AES");
@@ -167,7 +169,8 @@ public class EncryptionAlgorithmTest extends CamelTestSupport {
@Test
public void testAES256() throws Exception {
- assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED, "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED="+TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
+ assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED,
+ "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED=" + TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
// Set up the Key
KeyGenerator keygen = KeyGenerator.getInstance("AES");
@@ -193,10 +196,8 @@ public class EncryptionAlgorithmTest extends CamelTestSupport {
@Test
public void testAES256GCM() throws Exception {
- assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED, "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED="+TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
- if (!TestHelper.UNRESTRICTED_POLICIES_INSTALLED) {
- return;
- }
+ assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED,
+ "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED=" + TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
// Set up the Key
KeyGenerator keygen = KeyGenerator.getInstance("AES");
@@ -294,9 +295,8 @@ public class EncryptionAlgorithmTest extends CamelTestSupport {
@Test
public void testCAMELLIA192() throws Exception {
- if (!TestHelper.UNRESTRICTED_POLICIES_INSTALLED) {
- return;
- }
+ assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED,
+ "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED=" + TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
// Set up the Key
KeyGenerator keygen = KeyGenerator.getInstance("CAMELLIA");
@@ -322,9 +322,8 @@ public class EncryptionAlgorithmTest extends CamelTestSupport {
@Test
public void testCAMELLIA256() throws Exception {
- if (!TestHelper.UNRESTRICTED_POLICIES_INSTALLED) {
- return;
- }
+ assumeTrue(TestHelper.UNRESTRICTED_POLICIES_INSTALLED,
+ "Test preconditions failed: UNRESTRICTED_POLICIES_INSTALLED=" + TestHelper.UNRESTRICTED_POLICIES_INSTALLED);
// Set up the Key
KeyGenerator keygen = KeyGenerator.getInstance("CAMELLIA");
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java
index 268ec1ea454..c8822d74630 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java
@@ -20,23 +20,19 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-
-import static org.apache.camel.test.junit5.TestSupport.isPlatform;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
/**
* Test to verify that the XMPP consumer will reconnect when the connection is lost. Also verifies that the XMPP
* producer will lazily re-establish a lost connection.
*/
+@DisabledOnOs({ OS.AIX, OS.SOLARIS })
public class XmppRobustConnectionTest extends XmppBaseContainerTest {
@Disabled("Since upgrade to smack 4.2.0 the robust connection handling doesn't seem to work, as consumerEndpoint below receives only 5 payloads instead of the expected 9")
@Test
public void testXmppChatWithRobustConnection() throws Exception {
- // does not work well on aix or solaris
- if (isPlatform("aix") || isPlatform("sunos")) {
- return;
- }
-
MockEndpoint consumerEndpoint = context.getEndpoint("mock:out", MockEndpoint.class);
MockEndpoint errorEndpoint = context.getEndpoint("mock:error", MockEndpoint.class);
diff --git a/components/camel-zipkin/src/test/java/org/apache/camel/zipkin/ManagedZipkinSimpleRouteTest.java b/components/camel-zipkin/src/test/java/org/apache/camel/zipkin/ManagedZipkinSimpleRouteTest.java
index b17a0c98359..7c6fc6b973b 100644
--- a/components/camel-zipkin/src/test/java/org/apache/camel/zipkin/ManagedZipkinSimpleRouteTest.java
+++ b/components/camel-zipkin/src/test/java/org/apache/camel/zipkin/ManagedZipkinSimpleRouteTest.java
@@ -27,13 +27,15 @@ import org.apache.camel.builder.NotifyBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import zipkin2.reporter.Reporter;
-import static org.apache.camel.test.junit5.TestSupport.isPlatform;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
+@DisabledOnOs(OS.AIX)
public class ManagedZipkinSimpleRouteTest extends CamelTestSupport {
private ZipkinTracer zipkin;
@@ -67,11 +69,6 @@ public class ManagedZipkinSimpleRouteTest extends CamelTestSupport {
@Test
public void testZipkinRoute() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- if (isPlatform("aix")) {
- return;
- }
-
MBeanServer mbeanServer = getMBeanServer();
ObjectName on = new ObjectName(
"org.apache.camel:context=" + context.getManagementName() + ",type=services,name=ZipkinTracer");
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerChmodOptionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerChmodOptionTest.java
index df9509074a2..6e4f8600c4a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerChmodOptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerChmodOptionTest.java
@@ -31,25 +31,23 @@ import org.apache.camel.ResolveEndpointFailedException;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+@DisabledOnOs(OS.WINDOWS)
public class FileProducerChmodOptionTest extends ContextTestSupport {
@Test
public void testWriteValidChmod0755() throws Exception {
- assumeFalse(isPlatform("windows"));
-
runChmodCheck("0755", "rwxr-xr-x");
}
@Test
public void testWriteValidChmod666() throws Exception {
- assumeFalse(isPlatform("windows"));
-
runChmodCheck("666", "rw-rw-rw-");
}
@@ -71,8 +69,6 @@ public class FileProducerChmodOptionTest extends ContextTestSupport {
@Test
public void testInvalidChmod() throws Exception {
- assumeFalse(isPlatform("windows"));
-
try {
context.addRoutes(new RouteBuilder() {
@@ -98,8 +94,6 @@ public class FileProducerChmodOptionTest extends ContextTestSupport {
*/
@Test
public void testWriteNoChmod() throws Exception {
- assumeFalse(isPlatform("windows"));
-
MockEndpoint mock = getMockEndpoint("mock:noChmod");
mock.expectedMessageCount(1);
String testFileName = "noChmod.txt";
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerDirectoryChmodOptionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerDirectoryChmodOptionTest.java
index c99a2873ce4..beeb1adfa1b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerDirectoryChmodOptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerDirectoryChmodOptionTest.java
@@ -28,30 +28,26 @@ import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+@DisabledOnOs(OS.WINDOWS)
public class FileProducerDirectoryChmodOptionTest extends ContextTestSupport {
@Test
public void testWriteValidNoDir() throws Exception {
- assumeFalse(isPlatform("windows"));
-
runChmodCheck("NoDir", null, "rwxr-xr-x");
}
@Test
public void testWriteValidChmod0755() throws Exception {
- assumeFalse(isPlatform("windows"));
-
runChmodCheck("0755", "rwxrwxrwx", "rwxr-xr-x");
}
@Test
public void testWriteValidChmod666() throws Exception {
- assumeFalse(isPlatform("windows"));
-
runChmodCheck("666", "rwxrwxrwx", "rw-rw-rw-");
}
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
index ca977ab219b..03bbb651eb5 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
@@ -24,8 +24,8 @@ import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.spi.Registry;
import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
/**
* Unit test for expression option for file producer.
@@ -39,10 +39,9 @@ public class FileProducerExpressionTest extends ContextTestSupport {
return jndi;
}
+ @DisabledOnOs(OS.WINDOWS)
@Test
public void testProducerFileNameHeaderNotEvaluated() {
- assumeFalse(isPlatform("windows"));
-
template.sendBodyAndHeader(fileUri(), "Hello World", Exchange.FILE_NAME,
"$simple{myfile-${id}}.txt");
assertFileExists(testFile("$simple{myfile-${id}}.txt"));
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerFileExistTryRenameTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerFileExistTryRenameTest.java
index 20e0390face..2afc377f759 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerFileExistTryRenameTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerFileExistTryRenameTest.java
@@ -21,16 +21,14 @@ import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
+@DisabledOnOs(OS.WINDOWS)
public class FileProducerFileExistTryRenameTest extends ContextTestSupport {
@Test
public void testIgnore() throws Exception {
- // Does not work on Windows
- if (isPlatform("windows")) {
- return;
- }
-
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedBodiesReceived("Bye World");
mock.expectedFileExists(testFile("hello.txt"), "Bye World");
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropperManualTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropperManualTest.java
index ca911b7ab50..656f20912ac 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropperManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropperManualTest.java
@@ -22,10 +22,11 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
@Disabled("Manual test")
+@DisabledOnOs(OS.WINDOWS)
public class FileAsyncStressFileDropperManualTest extends ContextTestSupport {
private static int counter;
@@ -36,9 +37,6 @@ public class FileAsyncStressFileDropperManualTest extends ContextTestSupport {
@Test
public void testDropInNewFiles() throws Exception {
- // do not test on windows
- assumeFalse(isPlatform("windows"));
-
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMinimumMessageCount(250);
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManualTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManualTest.java
index f756d31a18c..759099446e8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManualTest.java
@@ -26,10 +26,11 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
@Disabled("Manual test")
+@DisabledOnOs(OS.WINDOWS)
public class FileAsyncStressManualTest extends ContextTestSupport {
private int files = 150;
@@ -37,8 +38,6 @@ public class FileAsyncStressManualTest extends ContextTestSupport {
@Override
@BeforeEach
public void setUp() throws Exception {
- // do not test on windows
- assumeFalse(isPlatform("windows"));
super.setUp();
for (int i = 0; i < files; i++) {
template.sendBodyAndHeader(fileUri(), "Hello World", Exchange.FILE_NAME, i + ".txt");
@@ -47,9 +46,6 @@ public class FileAsyncStressManualTest extends ContextTestSupport {
@Test
public void testAsyncStress() throws Exception {
- // do not test on windows
- assumeFalse(isPlatform("windows"));
-
// start route when all the files have been written
context.getRouteController().startRoute("foo");
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManuallyManualTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManuallyManualTest.java
index 002ff940f73..74c78590cf3 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManuallyManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressManuallyManualTest.java
@@ -25,17 +25,15 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
@Disabled("Manual test")
+@DisabledOnOs(OS.WINDOWS)
public class FileAsyncStressManuallyManualTest extends ContextTestSupport {
@Test
public void testAsyncStress() throws Exception {
- // do not test on windows
- assumeFalse(isPlatform("windows"));
-
// test by starting the unit test FileAsyncStressFileDropper in another
// JVM
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesManualTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesManualTest.java
index a546a02c83a..28361aece16 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/stress/FileConsumerPollManyFilesManualTest.java
@@ -23,10 +23,13 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
@Disabled("Manual test")
+@DisabledOnOs(OS.WINDOWS)
public class FileConsumerPollManyFilesManualTest extends ContextTestSupport {
private static final int FILES = 200;
@@ -34,9 +37,6 @@ public class FileConsumerPollManyFilesManualTest extends ContextTestSupport {
@Override
@BeforeEach
public void setUp() throws Exception {
- // do not test on windows
- assumeFalse(isPlatform("windows"));
-
super.setUp();
// create files
@@ -52,9 +52,6 @@ public class FileConsumerPollManyFilesManualTest extends ContextTestSupport {
@Test
public void testPollManyFiles() throws Exception {
- // do not test on windows
- assumeFalse(isPlatform("windows"));
-
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java
index b7b1a0a1007..86c080c9249 100644
--- a/core/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java
@@ -22,18 +22,16 @@ import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assertions.*;
+@DisabledOnOs(OS.WINDOWS)
public class StopRouteAbortAfterTimeoutTest extends ContextTestSupport {
@Test
public void testStopRouteWithAbortAfterTimeoutTrue() throws Exception {
- // doesnt test to well on all Windows
- if (isPlatform("windows")) {
- return;
- }
-
MockEndpoint mockEP = getMockEndpoint("mock:result");
mockEP.setExpectedMessageCount(10);
@@ -60,11 +58,6 @@ public class StopRouteAbortAfterTimeoutTest extends ContextTestSupport {
@Test
public void testStopRouteWithAbortAfterTimeoutFalse() throws Exception {
- // doesnt test to well on all Windows
- if (isPlatform("windows")) {
- return;
- }
-
MockEndpoint mockEP = getMockEndpoint("mock:result");
// send some message through the route
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
index 2b75ad6ca44..811550b8f4b 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithScannerIoExceptionTest.java
@@ -19,14 +19,16 @@ package org.apache.camel.processor;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
+@DisabledOnOs(OS.AIX)
public class SplitterWithScannerIoExceptionTest extends ContextTestSupport {
@Test
public void testSplitterStreamingWithError() throws Exception {
- assumeFalse(isPlatform("aix"));
assumeFalse(isJavaVendor("ibm"));
getMockEndpoint("mock:a").expectedMinimumMessageCount(250);
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerDslTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerDslTest.java
index 58bbf9e804f..2d09d32c026 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerDslTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerDslTest.java
@@ -23,23 +23,18 @@ import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
+@DisabledOnOs(OS.WINDOWS)
public class ThrottlerDslTest extends ContextTestSupport {
private static final int INTERVAL = 500;
protected int messageCount = 9;
- protected boolean canTest() {
- // skip test on windows as it does not run well there
- return !isPlatform("windows");
- }
-
@Test
public void testDsl() throws Exception {
- assumeTrue(canTest());
-
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
resultEndpoint.expectedMessageCount(messageCount);
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerMethodCallTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerMethodCallTest.java
index 5f5bec2f9fa..7255f31da86 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerMethodCallTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerMethodCallTest.java
@@ -25,19 +25,16 @@ import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.spi.Registry;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
+@DisabledOnOs(OS.WINDOWS)
public class ThrottlerMethodCallTest extends ContextTestSupport {
private static final int INTERVAL = 100;
protected int messageCount = 10;
- protected boolean canTest() {
- // skip test on windows as it does not run well there
- return !isPlatform("windows");
- }
-
@Override
protected Registry createRegistry() throws Exception {
Registry jndi = super.createRegistry();
@@ -51,8 +48,6 @@ public class ThrottlerMethodCallTest extends ContextTestSupport {
@Test
public void testConfigurationWithMethodCallExpression() throws Exception {
- assumeTrue(canTest());
-
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
resultEndpoint.expectedMessageCount(messageCount);
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerTest.java
index 4fb2ef498fd..20cd688ddb4 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerTest.java
@@ -24,24 +24,19 @@ import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
+@DisabledOnOs(OS.WINDOWS)
public class ThrottlerTest extends ContextTestSupport {
private static final int INTERVAL = 500;
private static final int TOLERANCE = 50;
private static final int MESSAGE_COUNT = 9;
- protected boolean canTest() {
- // skip test on windows as it does not run well there
- return !isPlatform("windows");
- }
-
@Test
public void testSendLotsOfMessagesButOnly3GetThroughWithin2Seconds() throws Exception {
- assumeTrue(canTest());
-
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
resultEndpoint.expectedMessageCount(3);
resultEndpoint.setResultWaitTime(2000);
@@ -57,8 +52,6 @@ public class ThrottlerTest extends ContextTestSupport {
@Test
public void testSendLotsOfMessagesWithRejectExecution() throws Exception {
- assumeTrue(canTest());
-
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
resultEndpoint.expectedMessageCount(2);
@@ -76,8 +69,6 @@ public class ThrottlerTest extends ContextTestSupport {
@Test
public void testSendLotsOfMessagesSimultaneouslyButOnly3GetThrough() throws Exception {
- assumeTrue(canTest());
-
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
long elapsed = sendMessagesAndAwaitDelivery(MESSAGE_COUNT, "direct:a", MESSAGE_COUNT, resultEndpoint);
assertThrottlerTiming(elapsed, 5, INTERVAL, MESSAGE_COUNT);
@@ -85,8 +76,6 @@ public class ThrottlerTest extends ContextTestSupport {
@Test
public void testConfigurationWithConstantExpression() throws Exception {
- assumeTrue(canTest());
-
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
long elapsed = sendMessagesAndAwaitDelivery(MESSAGE_COUNT, "direct:expressionConstant", MESSAGE_COUNT, resultEndpoint);
assertThrottlerTiming(elapsed, 5, INTERVAL, MESSAGE_COUNT);
@@ -94,8 +83,6 @@ public class ThrottlerTest extends ContextTestSupport {
@Test
public void testConfigurationWithHeaderExpression() throws Exception {
- assumeTrue(canTest());
-
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
resultEndpoint.expectedMessageCount(MESSAGE_COUNT);
@@ -109,10 +96,6 @@ public class ThrottlerTest extends ContextTestSupport {
@Test
public void testConfigurationWithChangingHeaderExpression() throws Exception {
- if (!canTest()) {
- return;
- }
-
ExecutorService executor = Executors.newFixedThreadPool(5);
try {
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerThreadPoolProfileTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerThreadPoolProfileTest.java
index f9eabec6404..9aa0344488a 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerThreadPoolProfileTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/ThrottlerThreadPoolProfileTest.java
@@ -21,20 +21,14 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.builder.ThreadPoolProfileBuilder;
import org.apache.camel.spi.ThreadPoolProfile;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.DisabledOnOs;
+import org.junit.jupiter.api.condition.OS;
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
-
+@DisabledOnOs(OS.WINDOWS)
public class ThrottlerThreadPoolProfileTest extends ContextTestSupport {
- protected boolean canTest() {
- // skip test on windows as it does not run well there
- return !isPlatform("windows");
- }
-
@Test
public void testThreadPool() throws Exception {
- assumeTrue(canTest());
-
getMockEndpoint("mock:result").expectedMessageCount(2);
template.sendBody("direct:start", "Hello");
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedPooledExchangeTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedPooledExchangeTest.java
index 5ad42df0a89..a3a711cf4c7 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedPooledExchangeTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedPooledExchangeTest.java
@@ -37,7 +37,6 @@ import org.junit.jupiter.api.condition.OS;
import static org.apache.camel.management.DefaultManagementObjectNameStrategy.TYPE_SERVICE;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertSame;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
@DisabledOnOs(OS.AIX)
public class ManagedPooledExchangeTest extends ManagementTestSupport {
@@ -59,9 +58,6 @@ public class ManagedPooledExchangeTest extends ManagementTestSupport {
@Test
public void testSameExchange() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
-
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(3);
mock.expectedPropertyValuesReceivedInAnyOrder("myprop", 1, 3, 5);
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGetPropertiesTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGetPropertiesTest.java
index c38aee9db06..6da379f5cc8 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGetPropertiesTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteGetPropertiesTest.java
@@ -37,9 +37,6 @@ public class ManagedRouteGetPropertiesTest extends ManagementTestSupport {
@Test
public void testGetProperties() throws Exception {
- // JMX tests don't work well on AIX CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
-
MBeanServer mbeanServer = getMBeanServer();
ObjectName on = getRouteObjectName(mbeanServer);
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
index d8f4a4573b5..564be009af0 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedRouteStopWithAbortAfterTimeoutTest.java
@@ -33,17 +33,12 @@ import org.junit.jupiter.api.condition.OS;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
-@DisabledOnOs(OS.AIX)
+@DisabledOnOs({ OS.WINDOWS, OS.AIX })
public class ManagedRouteStopWithAbortAfterTimeoutTest extends ManagementTestSupport {
@Test
public void testStopRouteWithAbortAfterTimeoutTrue() throws Exception {
- // JMX tests dont work well on AIX or windows CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
- assumeFalse(isPlatform("windows"));
-
MockEndpoint mockEP = getMockEndpoint("mock:result");
mockEP.setExpectedMessageCount(10);
@@ -81,10 +76,6 @@ public class ManagedRouteStopWithAbortAfterTimeoutTest extends ManagementTestSup
@Test
public void testStopRouteWithAbortAfterTimeoutFalse() throws Exception {
- // JMX tests dont work well on AIX or windows CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
- assumeFalse(isPlatform("windows"));
-
MockEndpoint mockEP = getMockEndpoint("mock:result");
MBeanServer mbeanServer = getMBeanServer();
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
index 93d337f298b..17cb8d1112c 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagedThrottlerTest.java
@@ -39,7 +39,6 @@ import static org.apache.camel.management.DefaultManagementObjectNameStrategy.TY
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assumptions.assumeFalse;
@DisabledOnOs(OS.AIX)
public class ManagedThrottlerTest extends ManagementTestSupport {
@@ -109,12 +108,9 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
assertTrue(total > 1000, "Should be around 1 sec now: was " + total);
}
+ @DisabledOnOs(OS.WINDOWS)
@Test
public void testThrottleVisableViaJmx() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
- assumeFalse(isPlatform("windows"));
-
// get the stats for the route
MBeanServer mbeanServer = getMBeanServer();
@@ -139,12 +135,9 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
assertEquals(10, completed.longValue());
}
+ @DisabledOnOs(OS.WINDOWS)
@Test
public void testThrottleAsyncVisableViaJmx() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
- assumeFalse(isPlatform("windows"));
-
// get the stats for the route
MBeanServer mbeanServer = getMBeanServer();
@@ -171,12 +164,9 @@ public class ManagedThrottlerTest extends ManagementTestSupport {
assertEquals(10, completed.longValue());
}
+ @DisabledOnOs(OS.WINDOWS)
@Test
public void testThrottleAsyncExceptionVisableViaJmx() throws Exception {
- // JMX tests dont work well on AIX CI servers (hangs them)
- assumeFalse(isPlatform("aix"));
- assumeFalse(isPlatform("windows"));
-
// get the stats for the route
MBeanServer mbeanServer = getMBeanServer();
diff --git a/core/camel-management/src/test/java/org/apache/camel/management/ManagementTestSupport.java b/core/camel-management/src/test/java/org/apache/camel/management/ManagementTestSupport.java
index 4dc456cd25d..3fa57e984b1 100644
--- a/core/camel-management/src/test/java/org/apache/camel/management/ManagementTestSupport.java
+++ b/core/camel-management/src/test/java/org/apache/camel/management/ManagementTestSupport.java
@@ -32,8 +32,6 @@ import org.apache.camel.ContextTestSupport;
import org.apache.camel.NamedNode;
import org.apache.camel.impl.engine.AbstractCamelContext;
import org.apache.camel.spi.NodeIdFactory;
-import org.junit.jupiter.api.condition.DisabledOnOs;
-import org.junit.jupiter.api.condition.OS;
import static org.apache.camel.management.DefaultManagementAgent.DEFAULT_DOMAIN;
import static org.apache.camel.management.DefaultManagementObjectNameStrategy.KEY_CONTEXT;
@@ -50,7 +48,6 @@ import static org.apache.camel.management.DefaultManagementObjectNameStrategy.TY
/**
* Base class for JMX tests.
*/
-@DisabledOnOs(OS.AIX)
public abstract class ManagementTestSupport extends ContextTestSupport {
@Override
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java b/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java
index c1b4071e56f..f33be9fc8b1 100644
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java
+++ b/tests/camel-itest/src/test/java/org/apache/camel/itest/ftp/SpringFileAntPathMatcherRemoteFileFilterTest.java
@@ -36,6 +36,7 @@ import org.springframework.test.context.ContextConfiguration;
*/
@CamelSpringTest
@ContextConfiguration
+@DisabledOnOs({ OS.AIX, OS.WINDOWS, OS.SOLARIS })
public class SpringFileAntPathMatcherRemoteFileFilterTest {
@RegisterExtension
public static FtpServiceExtension ftpServiceExtension
@@ -51,7 +52,6 @@ public class SpringFileAntPathMatcherRemoteFileFilterTest {
@EndpointInject("mock:result")
protected MockEndpoint result;
- @DisabledOnOs({ OS.AIX, OS.WINDOWS, OS.SOLARIS })
@Test
void testAntPatchMatherFilter() throws Exception {