From 50c4f325664ac52c27dd175d2b49988b6eee68a5 Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Sun, 3 Dec 2017 19:44:58 +0100 Subject: [PATCH 1/3] ARTEMIS-1532 Enable tests which are unintentionally skipped by Surefire These tests used to have a wrong name, so they weren't executed by Surefire during a `mvn test` run. After enablement, the following tests are now failing: * org.apache.activemq.artemis.tests.integration.cluster.ha.HAAutomaticBackupSharedStoreTest * org.apache.activemq.artemis.tests.integration.ra.OutgoingConnectionNoJTATest * org.apache.activemq.artemis.tests.unit.core.server.group.impl.SystemPropertyOverrideTest.testSystemPropertyOverride --- ...ptions.java => ConfigUsingDestinationOptionsTest.java} | 5 ++++- .../cluster/distribution/ClusteredGroupingTest.java | 1 + ...verTestWithDivert.java => FailoverWithDivertTest.java} | 2 +- ...edStore.java => HAAutomaticBackupSharedStoreTest.java} | 2 +- ...xt.java => ShutdownOnCriticalIOErrorMoveNextTest.java} | 2 +- .../{AMQPToJMSCore.java => AMQPToJMSCoreTest.java} | 2 +- ...ryOnGCest.java => CloseConnectionFactoryOnGCTest.java} | 4 +++- ...nectionTestJTA.java => OutgoingConnectionJTATest.java} | 2 +- ...ionTestNoJTA.java => OutgoingConnectionNoJTATest.java} | 2 +- ...terceptor.java => StompPropertiesInterceptorTest.java} | 6 +++--- ...thInterceptors.java => StompWithInterceptorsTest.java} | 8 ++++---- ...LargeMessages.java => StompWithLargeMessagesTest.java} | 2 +- ...TestWithMessageID.java => StompWithMessageIDTest.java} | 2 +- ...mpTestWithSecurity.java => StompWithSecurityTest.java} | 2 +- .../server/group/impl/SystemPropertyOverrideTest.java | 2 ++ 15 files changed, 26 insertions(+), 18 deletions(-) rename tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/{ConfigUsingDestinationOptions.java => ConfigUsingDestinationOptionsTest.java} (95%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/{FailoverTestWithDivert.java => FailoverWithDivertTest.java} (98%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ha/{HAAutomaticBackupSharedStore.java => HAAutomaticBackupSharedStoreTest.java} (97%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/critical/{ShutdownOnCriticalIOErrorMoveNext.java => ShutdownOnCriticalIOErrorMoveNextTest.java} (98%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/{AMQPToJMSCore.java => AMQPToJMSCoreTest.java} (98%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/{CloseConnectionFactoryOnGCest.java => CloseConnectionFactoryOnGCTest.java} (95%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/{OutgoingConnectionTestJTA.java => OutgoingConnectionJTATest.java} (99%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/{OutgoingConnectionTestNoJTA.java => OutgoingConnectionNoJTATest.java} (99%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/{StompTestPropertiesInterceptor.java => StompPropertiesInterceptorTest.java} (95%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/{StompTestWithInterceptors.java => StompWithInterceptorsTest.java} (96%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/{StompTestWithLargeMessages.java => StompWithLargeMessagesTest.java} (99%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/{StompTestWithMessageID.java => StompWithMessageIDTest.java} (97%) rename tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/{StompTestWithSecurity.java => StompWithSecurityTest.java} (97%) diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptionsTest.java similarity index 95% rename from tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java rename to tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptionsTest.java index 8637c53305e..c92685a7c05 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptionsTest.java @@ -26,9 +26,11 @@ import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQMessageConsumer; import org.apache.activemq.command.ActiveMQQueue; +import org.junit.Test; -public class ConfigUsingDestinationOptions extends TestCase { +public class ConfigUsingDestinationOptionsTest extends TestCase { + @Test(timeout = 60000) public void testValidSelectorConfig() throws JMSException { ActiveMQQueue queue = new ActiveMQQueue("TEST.FOO?consumer.selector=test=1"); @@ -46,6 +48,7 @@ public void testValidSelectorConfig() throws JMSException { assertEquals("test=1", cons.getMessageSelector()); } + @Test(timeout = 60000) public void testInvalidSelectorConfig() throws JMSException { ActiveMQQueue queue = new ActiveMQQueue("TEST.FOO?consumer.selector=test||1"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java index 7bc63127546..1c59990a3d1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java @@ -1579,6 +1579,7 @@ public void testGroupingMultipleQueuesOnAddress() throws Exception { } + @Test public void testGroupingMultipleSending() throws Exception { setupServer(0, isFileStorage(), isNetty()); setupServer(1, isFileStorage(), isNetty()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestWithDivert.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverWithDivertTest.java similarity index 98% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestWithDivert.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverWithDivertTest.java index 76efc22642c..943bb9deb65 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTestWithDivert.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverWithDivertTest.java @@ -38,7 +38,7 @@ import java.util.List; import java.util.Map; -public class FailoverTestWithDivert extends FailoverTestBase { +public class FailoverWithDivertTest extends FailoverTestBase { private static final String DIVERT_ADDRESS = "jms.queue.testQueue"; private static final String DIVERT_FORWARD_ADDRESS = "jms.queue.divertedQueue"; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ha/HAAutomaticBackupSharedStore.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ha/HAAutomaticBackupSharedStoreTest.java similarity index 97% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ha/HAAutomaticBackupSharedStore.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ha/HAAutomaticBackupSharedStoreTest.java index 8e82c2d6354..f52ef757afe 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ha/HAAutomaticBackupSharedStore.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/ha/HAAutomaticBackupSharedStoreTest.java @@ -26,7 +26,7 @@ import org.junit.Before; import org.junit.Test; -public class HAAutomaticBackupSharedStore extends ClusterTestBase { +public class HAAutomaticBackupSharedStoreTest extends ClusterTestBase { @Before public void setup() throws Exception { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/critical/ShutdownOnCriticalIOErrorMoveNext.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/critical/ShutdownOnCriticalIOErrorMoveNextTest.java similarity index 98% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/critical/ShutdownOnCriticalIOErrorMoveNext.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/critical/ShutdownOnCriticalIOErrorMoveNextTest.java index eb42856b28c..ebf7c0a0dbf 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/critical/ShutdownOnCriticalIOErrorMoveNext.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/critical/ShutdownOnCriticalIOErrorMoveNextTest.java @@ -44,7 +44,7 @@ import org.junit.Assert; import org.junit.Test; -public class ShutdownOnCriticalIOErrorMoveNext extends ActiveMQTestBase { +public class ShutdownOnCriticalIOErrorMoveNextTest extends ActiveMQTestBase { @Test public void testSimplyDownAfterError() throws Exception { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCore.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCoreTest.java similarity index 98% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCore.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCoreTest.java index 6335c698a10..08b6c811eff 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCore.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/crossprotocol/AMQPToJMSCoreTest.java @@ -44,7 +44,7 @@ import org.junit.Before; import org.junit.Test; -public class AMQPToJMSCore extends ActiveMQTestBase { +public class AMQPToJMSCoreTest extends ActiveMQTestBase { private ActiveMQServer server; protected String queueName = "amqTestQueue1"; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCTest.java similarity index 95% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCTest.java index 0dd966b7d08..3a445d89d3e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCTest.java @@ -25,12 +25,14 @@ import org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.apache.activemq.artemis.tests.util.JMSTestBase; +import org.junit.Test; /** * A CloseConnectionOnGCTest */ -public class CloseConnectionFactoryOnGCest extends JMSTestBase { +public class CloseConnectionFactoryOnGCTest extends JMSTestBase { + @Test(timeout = 60000) public void testCloseCFOnGC() throws Exception { final AtomicInteger valueGC = new AtomicInteger(0); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestJTA.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionJTATest.java similarity index 99% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestJTA.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionJTATest.java index ab32ad3b2ee..3a6bb03bd56 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestJTA.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionJTATest.java @@ -49,7 +49,7 @@ import org.junit.Before; import org.junit.Test; -public class OutgoingConnectionTestJTA extends ActiveMQRATestBase { +public class OutgoingConnectionJTATest extends ActiveMQRATestBase { protected ActiveMQResourceAdapter resourceAdapter; protected ActiveMQRAConnectionFactory qraConnectionFactory; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestNoJTA.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionNoJTATest.java similarity index 99% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestNoJTA.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionNoJTATest.java index 7b2ba8dfbbc..d18bf76e4f3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestNoJTA.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionNoJTATest.java @@ -48,7 +48,7 @@ import java.util.HashSet; import java.util.Set; -public class OutgoingConnectionTestNoJTA extends ActiveMQRATestBase { +public class OutgoingConnectionNoJTATest extends ActiveMQRATestBase { protected ActiveMQResourceAdapter resourceAdapter; protected ActiveMQRAConnectionFactory qraConnectionFactory; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestPropertiesInterceptor.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompPropertiesInterceptorTest.java similarity index 95% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestPropertiesInterceptor.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompPropertiesInterceptorTest.java index 62fa1b5f83a..f5656f5faf5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestPropertiesInterceptor.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompPropertiesInterceptorTest.java @@ -34,7 +34,7 @@ import java.util.Map; @RunWith(value = Parameterized.class) -public class StompTestPropertiesInterceptor extends StompTestBase { +public class StompPropertiesInterceptorTest extends StompTestBase { @Parameterized.Parameters(name = "{0}") public static Collection data() { @@ -44,14 +44,14 @@ public static Collection data() { @Override public List getIncomingInterceptors() { List stompIncomingInterceptor = new ArrayList<>(); - stompIncomingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompTestPropertiesInterceptor$StompFramePropertiesInterceptor"); + stompIncomingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompPropertiesInterceptorTest$StompFramePropertiesInterceptor"); return stompIncomingInterceptor; } @Override public List getOutgoingInterceptors() { List stompOutgoingInterceptor = new ArrayList<>(); - stompOutgoingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompTestPropertiesInterceptor$StompFramePropertiesInterceptor"); + stompOutgoingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompPropertiesInterceptorTest$StompFramePropertiesInterceptor"); return stompOutgoingInterceptor; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithInterceptors.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithInterceptorsTest.java similarity index 96% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithInterceptors.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithInterceptorsTest.java index b4e22178511..f795ad35ddc 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithInterceptors.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithInterceptorsTest.java @@ -33,13 +33,13 @@ import org.junit.Assert; import org.junit.Test; -public class StompTestWithInterceptors extends StompTestBase { +public class StompWithInterceptorsTest extends StompTestBase { @Override public List getIncomingInterceptors() { List stompIncomingInterceptor = new ArrayList<>(); - stompIncomingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompTestWithInterceptors$MyIncomingStompFrameInterceptor"); - stompIncomingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompTestWithInterceptors$MyCoreInterceptor"); + stompIncomingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompWithInterceptorsTest$MyIncomingStompFrameInterceptor"); + stompIncomingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompWithInterceptorsTest$MyCoreInterceptor"); return stompIncomingInterceptor; } @@ -47,7 +47,7 @@ public List getIncomingInterceptors() { @Override public List getOutgoingInterceptors() { List stompOutgoingInterceptor = new ArrayList<>(); - stompOutgoingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompTestWithInterceptors$MyOutgoingStompFrameInterceptor"); + stompOutgoingInterceptor.add("org.apache.activemq.artemis.tests.integration.stomp.StompWithInterceptorsTest$MyOutgoingStompFrameInterceptor"); return stompOutgoingInterceptor; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithLargeMessages.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithLargeMessagesTest.java similarity index 99% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithLargeMessages.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithLargeMessagesTest.java index 89eefdc749f..38da2d20842 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithLargeMessages.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithLargeMessagesTest.java @@ -36,7 +36,7 @@ @RunWith(Parameterized.class) @Ignore -public class StompTestWithLargeMessages extends StompTestBase { +public class StompWithLargeMessagesTest extends StompTestBase { // Web Socket has max frame size of 64kb. Large message tests only available over TCP. @Parameterized.Parameters(name = "{0}") diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithMessageID.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithMessageIDTest.java similarity index 97% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithMessageID.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithMessageIDTest.java index a82df0d64f8..c9e68e83935 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithMessageID.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithMessageIDTest.java @@ -29,7 +29,7 @@ import org.junit.Assert; import org.junit.Test; -public class StompTestWithMessageID extends StompTestBase { +public class StompWithMessageIDTest extends StompTestBase { @Override public boolean isEnableStompMessageId() { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithSecurity.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithSecurityTest.java similarity index 97% rename from tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithSecurity.java rename to tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithSecurityTest.java index ead152219d7..7bdc18b7699 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTestWithSecurity.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompWithSecurityTest.java @@ -25,7 +25,7 @@ import org.junit.Assert; import org.junit.Test; -public class StompTestWithSecurity extends StompTestBase { +public class StompWithSecurityTest extends StompTestBase { @Override public boolean isSecurityEnabled() { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/group/impl/SystemPropertyOverrideTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/group/impl/SystemPropertyOverrideTest.java index aa2b666e89d..0e22146f247 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/group/impl/SystemPropertyOverrideTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/group/impl/SystemPropertyOverrideTest.java @@ -19,6 +19,7 @@ import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.server.group.impl.GroupingHandlerConfiguration; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; +import org.junit.Test; public class SystemPropertyOverrideTest extends ActiveMQTestBase { // Constants ----------------------------------------------------- @@ -31,6 +32,7 @@ public class SystemPropertyOverrideTest extends ActiveMQTestBase { // Public -------------------------------------------------------- + @Test public void testSystemPropertyOverride() throws Exception { final String groupTimeoutPropertyValue = "1234"; final String reaperPeriodPropertyValue = "5678"; From 87287a2b4d35b14c50815faa01164a41bd28781b Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Sun, 3 Dec 2017 19:56:47 +0100 Subject: [PATCH 2/3] ARTEMIS-1532 Fix OutgoingConnectionNoJTATest --- .../ra/OutgoingConnectionNoJTATest.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionNoJTATest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionNoJTATest.java index d18bf76e4f3..2cc129f1e11 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionNoJTATest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionNoJTATest.java @@ -38,6 +38,7 @@ import javax.jms.Connection; import javax.jms.JMSContext; import javax.jms.JMSProducer; +import javax.jms.JMSRuntimeException; import javax.jms.Message; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; @@ -192,14 +193,22 @@ public void testSimpleMessageSendAndReceiveSessionTransacted2() throws Exception } @Test - public void sessionTransactedTestNoActiveJTATx() throws Exception { - JMSContext context = qraConnectionFactory.createContext(JMSContext.SESSION_TRANSACTED); + public void sessionNotTransactedTestNoActiveJTATx() throws Exception { + JMSContext context = qraConnectionFactory.createContext(JMSContext.AUTO_ACKNOWLEDGE); assertEquals(context.getSessionMode(), JMSContext.AUTO_ACKNOWLEDGE); } + @Test + public void sessionTransactedTestNoActiveJTATx() throws Exception { + try { + qraConnectionFactory.createContext(JMSContext.SESSION_TRANSACTED); + fail("Exception expected"); + } catch (JMSRuntimeException ignored) { + } + } @Test - public void testQueuSessionAckMode() throws Exception { + public void testQueueSessionAckMode() throws Exception { QueueConnection queueConnection = qraConnectionFactory.createQueueConnection(); @@ -216,7 +225,7 @@ public void testSimpleSendNoXAJMSContext() throws Exception { try (ClientSessionFactory sf = locator.createSessionFactory(); ClientSession session = sf.createSession(); - ClientConsumer consVerify = session.createConsumer("jms.queue." + MDBQUEUE); + ClientConsumer consVerify = session.createConsumer(MDBQUEUE); JMSContext jmsctx = qraConnectionFactory.createContext(); ) { session.start(); @@ -252,7 +261,7 @@ public void testSimpleSendNoXAJMS1() throws Exception { Queue q = ActiveMQJMSClient.createQueue(MDBQUEUE); try (ClientSessionFactory sf = locator.createSessionFactory(); ClientSession session = sf.createSession(); - ClientConsumer consVerify = session.createConsumer("jms.queue." + MDBQUEUE); + ClientConsumer consVerify = session.createConsumer(MDBQUEUE); Connection conn = qraConnectionFactory.createConnection(); ) { Session jmsSess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); From 5d6b614393e7a7dfefd1e452e0e1b8852ff59fcc Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Sun, 3 Dec 2017 23:51:01 +0100 Subject: [PATCH 3/3] ARTEMIS-1532 Use @Ignore annotation to disable tests --- .../integration/client/ConsumerWindowSizeTest.java | 13 +++++++------ .../distribution/ClusteredRequestResponseTest.java | 5 ++++- .../tests/integration/jms/client/PreACKJMSTest.java | 5 ++++- .../integration/openwire/SimpleOpenWireTest.java | 4 +++- .../tests/integration/security/SecurityTest.java | 7 +++++-- .../artemis/jms/tests/selector/SelectorTest.java | 5 ++++- 6 files changed, 27 insertions(+), 12 deletions(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java index 5bd3ea014a7..d3adee0fe90 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java @@ -44,6 +44,7 @@ import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; public class ConsumerWindowSizeTest extends ActiveMQTestBase { @@ -542,8 +543,9 @@ public void testSlowConsumerNoBuffer() throws Exception { internalTestSlowConsumerNoBuffer(false); } - // I believe this test became invalid after we started using another thread to deliver the large message - public void disabled_testSlowConsumerNoBufferLargeMessages() throws Exception { + @Test + @Ignore("I believe this test became invalid after we started using another thread to deliver the large message") + public void testSlowConsumerNoBufferLargeMessages() throws Exception { internalTestSlowConsumerNoBuffer(true); } @@ -559,13 +561,12 @@ private void internalTestSlowConsumerNoBuffer(final boolean largeMessages) throw server.start(); locator.setConsumerWindowSize(0); - - ClientSessionFactory sf = createSessionFactory(locator); - if (largeMessages) { - sf.getServerLocator().setMinLargeMessageSize(100); + locator.setMinLargeMessageSize(100); } + ClientSessionFactory sf = createSessionFactory(locator); + session = sf.createSession(false, true, true); SimpleString ADDRESS = addressA; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredRequestResponseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredRequestResponseTest.java index efbbac8243b..63acca77a74 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredRequestResponseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredRequestResponseTest.java @@ -18,6 +18,7 @@ import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; public class ClusteredRequestResponseTest extends ClusterTestBase { @@ -83,7 +84,9 @@ public void testRequestResponse() throws Exception { * * TODO: I believe this test is invalid. I'm just ignoring it for now. It will probably go away */ - public void invalidTest_testRequestResponseNoWaitForBindings() throws Exception { + @Test + @Ignore + public void testRequestResponseNoWaitForBindings() throws Exception { setupCluster(); startServers(0, 1, 2, 3, 4); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/PreACKJMSTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/PreACKJMSTest.java index cc96f083117..e6b23dea436 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/PreACKJMSTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/PreACKJMSTest.java @@ -29,6 +29,7 @@ import org.apache.activemq.artemis.api.jms.JMSFactoryType; import org.apache.activemq.artemis.tests.util.JMSTestBase; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; public class PreACKJMSTest extends JMSTestBase { @@ -95,7 +96,9 @@ public void internalTestPreACK(final int sessionType) throws Exception { assertNull("ConnectionFactory is on PreACK mode, the message shouldn't be received", msg2); } - public void disabled_testPreACKTransactional() throws Exception { + @Test + @Ignore + public void testPreACKTransactional() throws Exception { conn = cf.createConnection(); Session sess = conn.createSession(true, Session.SESSION_TRANSACTED); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java index ff31c183f5d..623c79966ac 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java @@ -72,6 +72,7 @@ import org.apache.activemq.command.ActiveMQTopic; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; public class SimpleOpenWireTest extends BasicOpenWireTest { @@ -433,7 +434,8 @@ public void testSendReceiveDifferentEncoding() throws Exception { } } - // @Test -- ignored for now + @Test + @Ignore("ignored for now") public void testKeepAlive() throws Exception { connection.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java index 3f814e4f900..f558cdf8513 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java @@ -62,6 +62,7 @@ import org.apache.activemq.artemis.tests.util.CreateMessage; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; public class SecurityTest extends ActiveMQTestBase { @@ -1605,7 +1606,9 @@ public void testComplexRoles() throws Exception { } - public void _testComplexRoles2() throws Exception { + @Test + @Ignore + public void testComplexRoles2() throws Exception { ActiveMQServer server = createServer(); server.start(); ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager(); @@ -1645,8 +1648,8 @@ public void _testComplexRoles2() throws Exception { ClientSession andrewConnection = null; ClientSession frankConnection = null; ClientSession samConnection = null; + locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true); ClientSessionFactory factory = createSessionFactory(locator); - factory.getServerLocator().setBlockOnNonDurableSend(true).setBlockOnDurableSend(true); ClientSession adminSession = factory.createSession("all", "all", false, true, true, false, -1); String genericQueueName = "genericQueue"; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/selector/SelectorTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/selector/SelectorTest.java index 80f0ced6302..21bc70453e2 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/selector/SelectorTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/selector/SelectorTest.java @@ -33,6 +33,7 @@ import org.apache.activemq.artemis.jms.tests.util.ProxyAssertSupport; import org.apache.activemq.artemis.tests.util.ActiveMQTestBase; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.assertNotNull; @@ -883,7 +884,9 @@ public void testJMSCorrelationIDOnSelector() throws Exception { // Test case proposed by a customer on this user forum: // http://community.jboss.org/thread/153426?tstart=0 // This test needs to be moved away - public void disabled_testMultipleConsumers() throws Exception { + @Test + @Ignore + public void testMultipleConsumers() throws Exception { Connection conn = null; try {