Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Artemis JMS/JNDI Destination Names in Unit Tests #128

Closed
gmallard opened this issue Jul 16, 2016 · 4 comments
Closed

Support Artemis JMS/JNDI Destination Names in Unit Tests #128

gmallard opened this issue Jul 16, 2016 · 4 comments

Comments

@gmallard
Copy link

Background: Artemis by default uses a JMS/JNDI style of destination names.

Each destination name is prefixed by 'jms.queue.', and the separator character for destinations is a period ('.').

Example destination names:

jms.queue.Q1
jms.queue.AnotherQ.a.b.1
jms.queue.MyQueue.Special

Changes:

Add support of a STOMP_ARTEMIS environment variable to detect if Artemis is the broker used.

Modify test/test_helper.rb method make_destination to detect the STOMP_ARTEMIS environment variable, and return a proper destination name.

Modify other unit tests as required to support Artemis destination names, and any observed broker specific behavior.

With this modification, unit tests that resemble the following should run:

STOMP_ARTEMIS=y STOMP_PORT=31613 rake test --trace
STOMP_ARTEMIS=y STOMP_PORT=31613 STOMP_TEST11p=1.1 rake test --trace
STOMP_ARTEMIS=y STOMP_PORT=31613 STOMP_TEST11p=1.2 rake test --trace
@gmallard
Copy link
Author

@mikola-spb Since you run Artemis, ..... are you interested in working on this?

Let me know please.

Regards, Guy

@gmallard
Copy link
Author

Needs to support topics as well.

@mikola-spb
Copy link

Hi, sorry missed you comment. I won't promise but will try to have a look. Support of Artemis in tests is a good thing for sure

@gmallard
Copy link
Author

Artemis support in unit tests was completed in stages. For the record, I use the following for unit tests:

#!/bin/sh
#
set -x
pref="STOMP_PORT=61613 rake test --trace"
echo =============== AMQ Stomp 1.0 ===============
eval $pref

pref="STOMP_PORT=61613 STOMP_TEST11p=1.1 STOMP_AMQ11=y STOMP_NOWILD=y rake test --trace"
echo =============== AMQ Stomp 1.1 ===============
eval $pref

pref="STOMP_PORT=61613 STOMP_TEST11p=1.2 STOMP_AMQ11=y STOMP_NOWILD=y rake test --trace"
echo =============== AMQ Stomp 1.2 ===============
eval $pref

pref="STOMP_TESTSSL=y STOMP_PORT=62613 STOMP_SSLPORT=62610 STOMP_DOTQUEUE=y STOMP_NOWILD=y rake test --trace"
echo =============== Apollo Stomp 1.0 ===============
eval $pref

pref="STOMP_TESTSSL=y STOMP_PORT=62613 STOMP_SSLPORT=62610 STOMP_DOTQUEUE=y STOMP_TEST11p=1.1 STOMP_NOWILD=y STOMP_APOLLO=y rake test --trace"
echo =============== Apollo Stomp 1.1 ===============
eval $pref

pref="STOMP_TESTSSL=y STOMP_PORT=62613 STOMP_SSLPORT=62610 STOMP_DOTQUEUE=y STOMP_TEST11p=1.2 STOMP_NOWILD=y STOMP_APOLLO=y rake test --trace"
echo =============== Apollo Stomp 1.2 ===============
eval $pref

pref="STOMP_TESTSSL=y STOMP_PORT=62613 STOMP_SSLPORT=62610 STOMP_DOTQUEUE=y STOMP_TEST11p=1.2 STOMP_NOWILD=y STOMP_CRLF=y STOMP_APOLLO=y rake test --trace"
echo =============== Apollo Stomp 1.2 - CRLF=y ===============
eval $pref

pref="STOMP_TESTSSL=y STOMP_PORT=62613 STOMP_SSLPORT=62610 STOMP_DOTQUEUE=y STOMP_TEST11p=1.2 STOMP_NOWILD=y STOMP_CONN=y STOMP_APOLLO=y rake test --trace"
echo =============== Apollo Stomp 1.2 - CONN=y ===============
eval $pref

pref="STOMP_RABBIT=y STOMP_PORT=41613 STOMP_DOTQUEUE=y STOMP_NOWILD=y rake test --trace"
echo =============== RabbitMQ Stomp 1.0 ===============
eval $pref

pref="STOMP_RABBIT=y STOMP_PORT=41613 STOMP_DOTQUEUE=y STOMP_NOWILD=y STOMP_TEST11p=1.1 rake test --trace"
echo =============== RabbitMQ Stomp 1.1 ===============
eval $pref

pref="STOMP_RABBIT=y STOMP_PORT=41613 STOMP_DOTQUEUE=y STOMP_NOWILD=y STOMP_TEST11p=1.2 rake test --trace"
echo =============== RabbitMQ Stomp 1.2 ===============
eval $pref

pref="STOMP_ARTEMIS=y STOMP_PORT=31613 STOMP_NOWILD=y rake test --trace"
echo =============== Artemis Stomp 1.0 ===============
eval $pref

pref="STOMP_ARTEMIS=y STOMP_PORT=31613 STOMP_NOWILD=y STOMP_TEST11p=1.1 rake test --trace"
echo =============== Artemis Stomp 1.1 ===============
eval $pref

pref="STOMP_ARTEMIS=y STOMP_PORT=31613 STOMP_NOWILD=y STOMP_TEST11p=1.2 rake test --trace"
echo =============== Artemis Stomp 1.2 ===============
eval $pref

set +x
exit 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants