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
|
@Parameter
|
||||||
private String testURI = null;
|
private String testURI = null;
|
||||||
|
|
||||||
|
@Parameter
|
||||||
|
private String testClientID = null;
|
||||||
|
|
||||||
@Parameter
|
@Parameter
|
||||||
private String testUser = null;
|
private String testUser = null;
|
||||||
|
|
||||||
|
@ -107,8 +110,8 @@ public class ArtemisCLIPlugin extends ArtemisAbstractPlugin {
|
||||||
long timeout = System.currentTimeMillis() + spawnTimeout;
|
long timeout = System.currentTimeMillis() + spawnTimeout;
|
||||||
while (System.currentTimeMillis() <= timeout) {
|
while (System.currentTimeMillis() <= timeout) {
|
||||||
try (ServerLocator locator = ActiveMQClient.createServerLocator(testURI)) {
|
try (ServerLocator locator = ActiveMQClient.createServerLocator(testURI)) {
|
||||||
if (testUser != null && testPassword != null) {
|
if (testUser != null || testPassword != null || testClientID != null) {
|
||||||
locator.createSessionFactory().createSession(testUser, testPassword, false, false, false, false, 0).close();
|
locator.createSessionFactory().createSession(testUser, testPassword, false, false, false, false, 0, testClientID).close();
|
||||||
} else {
|
} else {
|
||||||
locator.createSessionFactory().createSession().close();
|
locator.createSessionFactory().createSession().close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue