ARTEMIS-2739 Adding Input for queue name

This commit is contained in:
Clebert Suconic 2020-05-15 09:42:28 -04:00
parent 8d5a212bd2
commit 15b5616f0a
2 changed files with 5 additions and 1 deletions

View File

@ -36,7 +36,7 @@ import org.apache.commons.lang3.time.StopWatch;
public abstract class CheckAbstract extends AbstractAction {
@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")
private int timeout = 30000;

View File

@ -82,6 +82,10 @@ public class QueueCheck extends CheckAbstract {
protected CheckTask[] getCheckTasks() {
ArrayList<CheckTask> checkTasks = new ArrayList<>();
if (getName() == null) {
name = input("--name", "Name is a mandatory property for Queue check", null);
}
if (getName() == null) {
throw new IllegalArgumentException("The name of the queue is required");
}