ARTEMIS-2739 Adding Input for queue name
This commit is contained in:
parent
8d5a212bd2
commit
15b5616f0a
|
@ -36,7 +36,7 @@ import org.apache.commons.lang3.time.StopWatch;
|
||||||
public abstract class CheckAbstract extends AbstractAction {
|
public abstract class CheckAbstract extends AbstractAction {
|
||||||
|
|
||||||
@Option(name = "--name", description = "Name of the target to check")
|
@Option(name = "--name", description = "Name of the target to check")
|
||||||
private String name;
|
protected String name;
|
||||||
|
|
||||||
@Option(name = "--timeout", description = "Time to wait for the check execution, in milliseconds")
|
@Option(name = "--timeout", description = "Time to wait for the check execution, in milliseconds")
|
||||||
private int timeout = 30000;
|
private int timeout = 30000;
|
||||||
|
|
|
@ -82,6 +82,10 @@ public class QueueCheck extends CheckAbstract {
|
||||||
protected CheckTask[] getCheckTasks() {
|
protected CheckTask[] getCheckTasks() {
|
||||||
ArrayList<CheckTask> checkTasks = new ArrayList<>();
|
ArrayList<CheckTask> checkTasks = new ArrayList<>();
|
||||||
|
|
||||||
|
if (getName() == null) {
|
||||||
|
name = input("--name", "Name is a mandatory property for Queue check", null);
|
||||||
|
}
|
||||||
|
|
||||||
if (getName() == null) {
|
if (getName() == null) {
|
||||||
throw new IllegalArgumentException("The name of the queue is required");
|
throw new IllegalArgumentException("The name of the queue is required");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue