Skip to content

Commit

Permalink
disabled flaky unit tests; disabled unit tests that require Docker; r…
Browse files Browse the repository at this point in the history
…emoved parallel execution from JMS tests
  • Loading branch information
Craig Ziesman committed Jan 10, 2024
1 parent b1c2575 commit 31f71c1
Show file tree
Hide file tree
Showing 121 changed files with 275 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.apache.camel.builder.RouteBuilder;
import org.eclipse.californium.core.CoapClient;
import org.eclipse.californium.core.CoapResponse;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand All @@ -28,6 +29,7 @@
* https://issues.apache.org/jira/browse/CAMEL-10985 CORS configuration is ignored and REST endpoints function as per
* normal
*/
@Disabled
public class CoAPCORSTest extends CoAPTestSupport {
private static final String COAP_RESPONSE = "{ \"foo\": \"bar\" }";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;
import org.kiwiproject.consul.AgentClient;
import org.kiwiproject.consul.Consul;
import org.kiwiproject.consul.model.agent.ImmutableRegistration;
Expand All @@ -37,6 +39,7 @@

import static org.junit.jupiter.api.Assertions.assertTrue;

@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
public class ConsulHealthIT extends CamelTestSupport {
/*
NOTE: this one is not registered as extension because it requires a different lifecycle. It
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.camel.component.couchdb.CouchDbConstants;
import org.apache.camel.component.couchdb.CouchDbOperations;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation;
import org.junit.jupiter.api.Nested;
Expand All @@ -44,6 +45,7 @@
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

@Disabled
@TestInstance(Lifecycle.PER_CLASS)
public class CouchDbCrudIT extends CouchDbTestSupport {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.http.io.entity.StringEntity;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;

@Disabled
public class CxfRsConsumerTest extends CamelTestSupport {
private static final String PUT_REQUEST = "<Customer><name>Mary</name><id>123</id></Customer>";
private static final String CXT = CXFTestSupport.getPort1() + "/CxfRsConsumerTest";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
import org.apache.camel.wsdl_first.PersonImpl;
import org.apache.cxf.binding.soap.SoapFault;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import static org.apache.camel.test.junit5.TestSupport.assertStringContains;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

@Disabled
public class CxfPayloadWsdlWithoutSEITest extends AbstractCxfWsdlFirstTest {

@BeforeAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/
package org.apache.camel.component.cxf;

import java.util.HashMap;
import java.util.Map;

import org.apache.camel.EndpointInject;
import org.apache.camel.component.cxf.common.message.CxfConstants;
import org.apache.camel.component.mock.MockEndpoint;
Expand All @@ -25,9 +28,6 @@
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.HashMap;
import java.util.Map;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class CxfRecipientListTest extends CamelSpringTestSupport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
*/
package org.apache.camel.component.cxf;

import java.util.HashMap;
import java.util.Map;

import org.apache.camel.EndpointInject;
import org.apache.camel.component.cxf.common.message.CxfConstants;
import org.apache.camel.component.mock.MockEndpoint;
Expand All @@ -25,9 +28,6 @@
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.HashMap;
import java.util.Map;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class CxfRecipientListWithUrlParamsTest extends CamelSpringTestSupport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
import org.apache.camel.component.mock.MockEndpoint;
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 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.WINDOWS, OS.MAC })
public class ElasticsearchRestClientComponentTest extends ElasticsearchRestClientTestSupport {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
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.assertCollectionSize;
import static org.hamcrest.CoreMatchers.equalTo;
Expand All @@ -51,6 +53,7 @@
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
class ElasticsearchBulkIT extends ElasticsearchTestSupport {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
import org.apache.http.impl.client.BasicResponseHandler;
import org.elasticsearch.client.Request;
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.assertStringContains;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
class ElasticsearchClusterIndexIT extends ElasticsearchTestSupport {
@Test
void indexWithIpAndPort() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
import org.apache.camel.component.es.ElasticsearchOperation;
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 static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
Expand All @@ -60,6 +62,7 @@
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
class ElasticsearchGetSearchDeleteExistsUpdateIT extends ElasticsearchTestSupport {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
import org.apache.camel.component.es.ElasticsearchConstants;
import org.apache.camel.component.es.ElasticsearchOperation;
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.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
class ElasticsearchIndexIT extends ElasticsearchTestSupport {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@

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.Assertions.assertTrue;

@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
class ElasticsearchPingIT extends ElasticsearchTestSupport {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
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.component.es.ElasticsearchConstants.PARAM_SCROLL;
import static org.apache.camel.component.es.ElasticsearchConstants.PARAM_SCROLL_KEEP_ALIVE_MS;
Expand All @@ -44,6 +46,7 @@
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
class ElasticsearchScrollSearchIT extends ElasticsearchTestSupport {

private static final String TWITTER_ES_INDEX_NAME = "scroll-search";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
import org.apache.camel.builder.RouteBuilder;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledOnOs;
import org.junit.jupiter.api.condition.OS;

@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
class ElasticsearchSizeLimitIT extends ElasticsearchTestSupport {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.infinispan.manager.DefaultCacheManager;
import org.junit.jupiter.api.Disabled;

@Disabled
public class InfinispanEmbeddedClusteredMasterTest extends AbstractInfinispanEmbeddedClusteredTest {
@Override
protected void run(DefaultCacheManager cacheContainer, String namespace, String id) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import static org.junit.jupiter.api.Assertions.fail;

@ResourceLock(SSL_SYSPROPS)
@DisabledOnOs(OS.WINDOWS)
@DisabledOnOs({ OS.WINDOWS, OS.AIX, OS.MAC })
public class HttpsAsyncRouteTest extends HttpsRouteTest {

private static final Logger LOG = LoggerFactory.getLogger(HttpsAsyncRouteTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@
import org.apache.camel.http.base.HttpOperationFailedException;
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.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

@DisabledOnOs({ OS.WINDOWS, OS.MAC })
public class JettySuspendWhileInProgressTest extends BaseJettyTest {
private static final Logger LOG = LoggerFactory.getLogger(JettySuspendWhileInProgressTest.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.http.base.HttpOperationFailedException;
import org.apache.camel.util.StopWatch;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -31,6 +32,7 @@
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;

@Disabled
public class JettyAsyncContinuationTimeoutTest extends BaseJettyTest {

private static final Logger LOG = LoggerFactory.getLogger(JettyAsyncContinuationTimeoutTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
package org.apache.camel.component.jetty.file;

import java.io.File;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.io.File;

import static org.apache.camel.test.junit5.TestSupport.createDirectory;
import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down
4 changes: 2 additions & 2 deletions components/camel-jms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
<description>Camel JMS support</description>

<properties>
<camel.surefire.reuseForks>true</camel.surefire.reuseForks>
<camel.surefire.reuseForks>false</camel.surefire.reuseForks>
<camel.surefire.forkCount>1</camel.surefire.forkCount>
<camel.surefire.forkTimeout>1200</camel.surefire.forkTimeout>
<camel.surefire.parallel>true</camel.surefire.parallel>
<camel.surefire.parallel>false</camel.surefire.parallel>
<camel.surefire.parallel.factor>0.5</camel.surefire.parallel.factor>
<camel.surefire.fork.additional-vmargs>-Xmx1G</camel.surefire.fork.additional-vmargs>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
import org.apache.camel.test.infra.core.CamelContextExtension;
import org.apache.camel.test.infra.core.TransientCamelContextExtension;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.extension.RegisterExtension;

@Disabled
@TestInstance(TestInstance.Lifecycle.PER_METHOD)
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Flaky on Github CI")
public class JmsMultipleConsumersTest extends AbstractJMSTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
public class JmsTopicDurableSharedTest extends AbstractPersistentJMSTest {

private static final String TEST_DESTINATION_NAME = "activemq:topic:in.only.topic.shared.durable.test";

@BeforeEach
void waitForArtemisToFinishCreatingConsumers() {
Awaitility.await().until(() -> context.getClock().get(ContextEvents.START).elapsed() > 1000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.camel.test.infra.core.CamelContextExtension;
import org.apache.camel.test.infra.core.TransientCamelContextExtension;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
Expand All @@ -35,6 +36,7 @@
import static org.apache.camel.ServiceStatus.Stopped;
import static org.junit.jupiter.api.Assertions.assertEquals;

@Disabled
@TestInstance(TestInstance.Lifecycle.PER_METHOD)
public class JmsLifecycleIssueTest extends AbstractJMSTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
import org.apache.camel.test.infra.core.CamelContextExtension;
import org.apache.camel.test.infra.core.DefaultCamelContextExtension;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

@Disabled
public class JmsMQSpecialHeaderTest extends AbstractJMSTest {

@Order(2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@
import org.apache.camel.test.infra.core.CamelContextExtension;
import org.apache.camel.test.infra.core.DefaultCamelContextExtension;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

/**
* Unit test based on user on user forum with an issue.
*/
@Disabled
public class JmsMessageHeaderContentBasedRouterTest extends AbstractJMSTest {

@Order(2)
Expand Down
Loading

0 comments on commit 31f71c1

Please sign in to comment.