Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
73 changes: 67 additions & 6 deletions activemq-unit-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
<name>ActiveMQ :: Unit Tests</name>
<description>The ActiveMQ Message Broker and Client Unit Tests</description>

<properties>
<surefire.version>3.5.3</surefire.version>
</properties>

<dependencies>

<!-- =============================== -->
Expand Down Expand Up @@ -391,12 +395,38 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<forkedProcessTimeoutInSeconds>3600</forkedProcessTimeoutInSeconds>
<runOrder>alphabetical</runOrder>
<reportFormat>plain</reportFormat>
<failIfNoTests>false</failIfNoTests>
<excludedGroups>org.apache.activemq.test.annotations.ParallelTest</excludedGroups>
<systemPropertyVariables>
<org.apache.activemq.default.directory.prefix>${project.build.directory}/</org.apache.activemq.default.directory.prefix>
<java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
<org.apache.activemq.AutoFailTestSupport.disableSystemExit>true</org.apache.activemq.AutoFailTestSupport.disableSystemExit>
<org.apache.activemq.broker.jmx.createConnector>false</org.apache.activemq.broker.jmx.createConnector>
</systemPropertyVariables>
<consoleOutputReporter>
<disable>true</disable>
</consoleOutputReporter>
<statelessTestsetInfoReporter
implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporter">
<printStacktraceOnError>true</printStacktraceOnError>
<printStacktraceOnFailure>true</printStacktraceOnFailure>
<printStdoutOnError>true</printStdoutOnError>
<printStdoutOnFailure>true</printStdoutOnFailure>
<printStderrOnError>true</printStderrOnError>
<printStderrOnFailure>true</printStderrOnFailure>
</statelessTestsetInfoReporter>
<includes>
<include>**/*Test.*</include>
</includes>
<excludes>
<!-- temporarily exclude failing tests so that CI works; fix asap and reenable -->
<exclude>**/AMQ4092Test.java</exclude>
Expand All @@ -422,14 +452,45 @@
<exclude>**/StartAndConcurrentStopBrokerTest.java</exclude>
<exclude>**/BlobTransferPolicyUriTest.java</exclude>
</excludes>
<systemPropertyVariables>
<java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
<org.apache.activemq.default.directory.prefix>target/</org.apache.activemq.default.directory.prefix>
<org.apache.activemq.AutoFailTestSupport.disableSystemExit>true</org.apache.activemq.AutoFailTestSupport.disableSystemExit>
<org.apache.activemq.broker.jmx.createConnector>false</org.apache.activemq.broker.jmx.createConnector>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<id>parallel</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<!-- drop the default excludedGroups -->
<excludedGroups combine.self="override"/>
<groups>org.apache.activemq.test.annotations.ParallelTest</groups>
<forkCount>2C</forkCount>
<reuseForks>false</reuseForks>
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
<failIfNoTests>false</failIfNoTests>
<systemPropertyVariables>
<org.apache.activemq.default.directory.prefix>${project.build.directory}/parallel-tests-${surefire.forkNumber}/</org.apache.activemq.default.directory.prefix>
<!-- when running tests in parallel in the CI (quite slow) we need to bump the wireformat negotiation timeout (5s by default) -->
<org.apache.activemq.transport.wireFormatNegotiationTimeout>30000</org.apache.activemq.transport.wireFormatNegotiationTimeout>
</systemPropertyVariables>
<excludes combine.children="append"/>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>${surefire.version}</version>
</dependency>
<dependency>
<groupId>me.fabriciorby</groupId>
<artifactId>maven-surefire-junit5-tree-reporter</artifactId>
<version>1.5.1</version>
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@
import org.apache.activemq.util.IdGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
* ActiveMQMessageAuditTest
*
*
*/
@Category(ParallelTest.class)
public class ActiveMQMessageAuditTest extends TestCase {

static final Logger LOG = LoggerFactory.getLogger(ActiveMQMessageAuditTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@


import static org.junit.Assert.*;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

@Category(ParallelTest.class)
public class ActiveMQXAConnectionTxInterruptTest {
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQXAConnectionTxInterruptTest.class);
long txGenerator = System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
*/
package org.apache.activemq;

import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

@Category(ParallelTest.class)
public class ActiveMQXASslConnectionFactoryTest extends ActiveMQSslConnectionFactoryTest {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
package org.apache.activemq;

import java.net.URI;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
* Test the against the VM transport
*/
@Category(ParallelTest.class)
public class ActiveMQXASslConnectionFactoryVmTest extends ActiveMQXAConnectionFactoryTest {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
import org.apache.activemq.broker.BrokerRegistry;
import org.apache.activemq.transport.stomp.Stomp;
import org.apache.activemq.transport.stomp.StompConnection;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

@Category(ParallelTest.class)
public class BrokerDurableRejectedTest extends TestSupport {

protected Connection connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
import org.apache.activemq.command.RemoveInfo;
import org.apache.activemq.command.SessionInfo;
import org.apache.activemq.transport.TransportFactory;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

@Category(ParallelTest.class)
public class ClientTestSupport extends TestCase {

protected BrokerService broker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
import jakarta.jms.Session;

import junit.framework.TestCase;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
*
*/
@Category(ParallelTest.class)
public class ConnectionCleanupTest extends TestCase {

private ActiveMQConnection connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
import jakarta.jms.Session;

import junit.framework.TestCase;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
*
*/
@Category(ParallelTest.class)
public class ConnectionCloseMultipleTimesConcurrentTest extends TestCase {

private ActiveMQConnection connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
import jakarta.jms.Session;

import junit.framework.TestCase;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
*
*/
@Category(ParallelTest.class)
public class ConnectionCloseMultipleTimesTest extends TestCase {

private ActiveMQConnection connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

@Category(ParallelTest.class)
public class ConsumerReceiveWithTimeoutTest {

private ActiveMQConnection connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
*
*/
@Category(ParallelTest.class)
public class CreateConsumerButDontStartConnectionWarningTest extends JmsQueueSendReceiveTest {
private static final transient Logger LOG = LoggerFactory.getLogger(CreateConsumerButDontStartConnectionWarningTest.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@
package org.apache.activemq;

import jakarta.jms.Connection;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
* A base class for a test case which creates an embedded broker and uses a connection and session
*
*
*/
@Category(ParallelTest.class)
public abstract class EmbeddedBrokerAndConnectionTestSupport extends EmbeddedBrokerTestSupport {
protected Connection connection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

@Category(ParallelTest.class)
public class ExclusiveConsumerStartupDestinationTest extends EmbeddedBrokerTestSupport{

private static final String VM_BROKER_URL = "vm://localhost";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

@Category(ParallelTest.class)
public class ExclusiveConsumerTest {

private static final String VM_BROKER_URL = "vm://localhost";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;


/**
Expand All @@ -60,6 +62,7 @@
* Now only messages tied to the MessageAck are expired which fixes this problem.
*
*/
@Category(ParallelTest.class)
public class ExpiredAckAsyncConsumerTest {
private static final Logger LOG = LoggerFactory.getLogger(ExpiredAckAsyncConsumerTest.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
* User: gtully
*/
@RunWith(BlockJUnit4ClassRunner.class)
@Category(ParallelTest.class)
public class ExpiryHogTest extends JmsMultipleClientsTestSupport {
boolean sleep = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@
import org.slf4j.LoggerFactory;

import static org.apache.activemq.TestSupport.getDestinationConsumers;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
* Test cases used to test the JMS message consumer.
*/
@Category(ParallelTest.class)
public class JMSConsumerTest extends JmsTestSupport {

private static final Logger LOG = LoggerFactory.getLogger(JMSConsumerTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
*
*/
@Category(ParallelTest.class)
public class JMSDurableTopicRedeliverTest extends JmsTopicRedeliverTest {

private static final Logger LOG = LoggerFactory.getLogger(JMSDurableTopicRedeliverTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@

import junit.framework.Test;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
* Test cases used to test the JMS message exclusive consumers.
*
*
*/
@Category(ParallelTest.class)
public class JMSExclusiveConsumerTest extends JmsTestSupport {

public int deliveryMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
*
*/
@Category(ParallelTest.class)
public class JMSIndividualAckTest extends TestSupport {

private Connection connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@
import junit.framework.Test;

import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.test.annotations.ParallelTest;
import org.junit.experimental.categories.Category;

/**
* Test cases used to test the JMS message consumer.
*
*
*/
@Category(ParallelTest.class)
public class JMSMessageTest extends JmsTestSupport {

public ActiveMQDestination destination;
Expand Down
Loading