Description
Currently, there are three sets of JMS tests in Apache ActiveMQ Artemis codebase (that I know of)
- activemq-artemis/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/*
- activemq-artemis/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/*
- activemq-artemis/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/*
The first two are being run only through the Core JMS client, while the last one is being run through Qpid JMS client (with few exceptions).
It should be beneficial to be able to run all JMS tests through all three protocols that Artemis supports that have a JMS client, these being
- Core (artemis-jms-client),
- OpenWire (activemq-client), and
- AMQP (qpid-jms-client).
I made an attempt to convert some of the tests to a parametrized test with changeable connection factory. The way org.apache.activemq.artemis.tests.integration.persistence.SyncSendTest currently does it. See https://github.com/jdanekrh/activemq-artemis/pull/4
There are the following obstackes
- Some tests go beyond the JMS standardized APIs and cast the JMS object to specific implementations in their chosen library.
- Some tests require specific settings on the connection factory, these are not portable across different JMS clients. There will have to be branching depending on the specific factory currently in use, or something...
- OpenWire client supports JMS 1.1, while Core and AMQP clients are JMS 2.0, some tests will have to be skipped on OpenWire
- OpenWire client has different semantics of receiver.receiveNoWait() call; when there are no messages in prefetch cache, OpenWire returns null, while other clients do a round trip to server to check for new messages before giving up.
There are some improvements which can be considered later, some of these are partially implemented in various places
- share broker between individual tests
- use random name or random suffix for created addresses and queues use suffix for queues/topics to ensure isolation
- have broker uberconfig for all tests, or group tests by config they need, so that reconfiguring broker is limited
- that also allows tests to run in parallel
- use random port for acceptor on broker, can run tests even more parallel, and mitigates environmentally caused failures
I intend to report the failures I found so far (see the code at the link above) and I am reasonably certain they are actual failures. The rest I plan to note in comments here, one test per comment.
If you happen to have any comments and suggestions how to do this better, I'd be glad to hear them.
Attachments
Issue Links
- is a child of
-
ARTEMIS-1341 Core JMS does not permit calling Message#getBytes(arbitrary type) when message has empty body
- Resolved
-
ARTEMIS-1345 Concurrent Modification Exceptions after Message.copy
- Closed
-
ARTEMIS-1416 Queue autocreate does not autocreate queue if address already exists
- Closed
-
QPIDJMS-313 Message#getBody does not throw when attempting to read a BytesMessage as String.class
- Closed
-
ARTEMIS-1344 JMS test TemporaryQueueClusterTest#testTemporaryQueue fails on the OpenWire protocol (with activemq-client JMS library)
- Resolved
-
ARTEMIS-1338 JMS test AmqpMessageRoutingTest#testRoutingExclusivity fails with the OpenWire protocol (activemq-client library)
- Resolved
- is a parent of
-
ARTEMIS-1337 The message groups feature does not work for OpenWire protocol
- Resolved
-
QPIDJMS-312 Exception is not thrown when user attempts to create context with invalid session mode value
- Closed
-
ARTEMIS-1331 JMS test ConnectionTest#testTXTypeInvalid passes with Core JMS (artemis-jms-client) and fails with the other ones
- Open
-
ARTEMIS-1329 JMS test NoLocalSubscriberTest#testNoLocalReconnect fails with OpenWire protocol (activemq-client JMS library)
- Resolved
-
ARTEMIS-1339 JMS tests JMSMessageConsumerTest#testSelectorsWithJMSPriority and #testJMSSelectorFiltersJMSMessageID fail with OpenWire protocol (activemq-client JMS library)
- Resolved
-
ARTEMIS-1340 JMS test JMSQueueBrowserTest#testQueueBrowserInTxSessionLeavesOtherWorkUnaffected fails with the OpenWire protocol (activemq-client JMS library)
- Resolved
-
ARTEMIS-1336 JMS test DivertAndACKClientTest fails with OpenWire protocol (activemq-client JMS library)
- Resolved