mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-23 18:57:14 +00:00
ARTEMIS-3715 Support testClientID for artemis-maven-plugin
This commit is contained in:
parent
82069e9c3c
commit
f7915a2733
@ -62,6 +62,9 @@ public class ArtemisCLIPlugin extends ArtemisAbstractPlugin {
|
||||
@Parameter
|
||||
private String testURI = null;
|
||||
|
||||
@Parameter
|
||||
private String testClientID = null;
|
||||
|
||||
@Parameter
|
||||
private String testUser = null;
|
||||
|
||||
@ -107,8 +110,8 @@ public class ArtemisCLIPlugin extends ArtemisAbstractPlugin {
|
||||
long timeout = System.currentTimeMillis() + spawnTimeout;
|
||||
while (System.currentTimeMillis() <= timeout) {
|
||||
try (ServerLocator locator = ActiveMQClient.createServerLocator(testURI)) {
|
||||
if (testUser != null && testPassword != null) {
|
||||
locator.createSessionFactory().createSession(testUser, testPassword, false, false, false, false, 0).close();
|
||||
if (testUser != null || testPassword != null || testClientID != null) {
|
||||
locator.createSessionFactory().createSession(testUser, testPassword, false, false, false, false, 0, testClientID).close();
|
||||
} else {
|
||||
locator.createSessionFactory().createSession().close();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user