From f7915a273359622b5c59b3bf7e40003e9f6bf77c Mon Sep 17 00:00:00 2001 From: Domenico Francesco Bruscino Date: Thu, 10 Mar 2022 10:00:47 +0100 Subject: [PATCH] ARTEMIS-3715 Support testClientID for artemis-maven-plugin --- .../apache/activemq/artemis/maven/ArtemisCLIPlugin.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java index 7f18f389f4..74058df515 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java @@ -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(); }