ARTEMIS-4372 small fixes on CLI
This commit is contained in:
parent
2656643267
commit
05f8e5d68f
|
@ -188,7 +188,6 @@ public class ConnectionAbstract extends InputAbstract {
|
|||
try {
|
||||
tryConnect(brokerURL, user, password, cf);
|
||||
} catch (Exception e2) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return cf;
|
||||
} catch (JMSException e) {
|
||||
|
@ -204,7 +203,6 @@ public class ConnectionAbstract extends InputAbstract {
|
|||
try {
|
||||
tryConnect(brokerURL, user, password, cf);
|
||||
} catch (Exception e2) {
|
||||
e2.printStackTrace();
|
||||
}
|
||||
return cf;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ public class DestAbstract extends ConnectionAbstract {
|
|||
return messageCount;
|
||||
}
|
||||
|
||||
public DestAbstract setMessageCount(int messageCount) {
|
||||
public DestAbstract setMessageCount(long messageCount) {
|
||||
this.messageCount = messageCount;
|
||||
return this;
|
||||
}
|
||||
|
@ -146,6 +146,10 @@ public class DestAbstract extends ConnectionAbstract {
|
|||
public Object execute(ActionContext context) throws Exception {
|
||||
super.execute(context);
|
||||
|
||||
if (oldBatchSize > 0 && txBatchSize > 0) {
|
||||
throw new IllegalArgumentException("Either select --txt-size or --commit-interval. Cannot use both!");
|
||||
}
|
||||
|
||||
if (oldBatchSize > 0) {
|
||||
context.out.println("--txt-size is deprecated, please use --commit-interval");
|
||||
txBatchSize = oldBatchSize;
|
||||
|
|
|
@ -182,10 +182,10 @@ public class CheckTest extends CliTestBase {
|
|||
Object slave = Artemis.execute(false, false, null, slaveInstance, null, "run");
|
||||
ActiveMQServerImpl slaveServer = (ActiveMQServerImpl)((Pair)slave).getB();
|
||||
|
||||
Wait.assertTrue("Backup isn't announced", () -> slaveServer.getBackupManager() != null &&
|
||||
slaveServer.getBackupManager().isStarted() && slaveServer.getBackupManager().isBackupAnnounced(), 30000);
|
||||
|
||||
try {
|
||||
Wait.assertTrue("Backup isn't announced", () -> slaveServer.getBackupManager() != null &&
|
||||
slaveServer.getBackupManager().isStarted() && slaveServer.getBackupManager().isBackupAnnounced(), 30000);
|
||||
|
||||
context = new TestActionContext();
|
||||
nodeCheck = new NodeCheck();
|
||||
nodeCheck.setUser("admin");
|
||||
|
|
|
@ -67,7 +67,7 @@ public class QueuesTest extends ConsoleTest {
|
|||
|
||||
@Test
|
||||
public void testAutoCreatedQueue() throws Exception {
|
||||
final int messages = 1;
|
||||
final long messages = 1;
|
||||
final String queueName = "TEST";
|
||||
final String messageText = "TEST";
|
||||
|
||||
|
@ -105,7 +105,7 @@ public class QueuesTest extends ConsoleTest {
|
|||
consumer.setSilentInput(true);
|
||||
consumer.setReceiveTimeout(2000);
|
||||
consumer.setBreakOnNull(true);
|
||||
int consumed = (int)consumer.execute(new ActionContext());
|
||||
long consumed = (long)consumer.execute(new ActionContext());
|
||||
|
||||
assertEquals(messages, consumed);
|
||||
|
||||
|
@ -223,7 +223,7 @@ public class QueuesTest extends ConsoleTest {
|
|||
createQueueCommand.setAutoCreateAddress(true);
|
||||
createQueueCommand.execute(new ActionContext());
|
||||
|
||||
final int messages = 1;
|
||||
final long messages = 1;
|
||||
beforeSendingQueuesPage.refresh(DEFAULT_TIMEOUT);
|
||||
Wait.assertEquals(1, () -> beforeSendingQueuesPage.countQueue("DLQ"));
|
||||
Wait.assertEquals(1, () -> beforeSendingQueuesPage.countQueue(queueName));
|
||||
|
@ -250,7 +250,7 @@ public class QueuesTest extends ConsoleTest {
|
|||
consumer.setSilentInput(true);
|
||||
consumer.setReceiveTimeout(2000);
|
||||
consumer.setBreakOnNull(true);
|
||||
int consumed = (int)consumer.execute(new ActionContext());
|
||||
long consumed = (long)consumer.execute(new ActionContext());
|
||||
|
||||
assertEquals(messages, consumed);
|
||||
|
||||
|
|
|
@ -50,13 +50,13 @@ public class SmokePagingTest extends SmokeTestBase {
|
|||
public void testCoreOnCLI() throws Exception {
|
||||
|
||||
String protocol = "core";
|
||||
int NUMBER_OF_MESSAGES = 5000;
|
||||
long NUMBER_OF_MESSAGES = 5000;
|
||||
|
||||
internalReceive(protocol, NUMBER_OF_MESSAGES);
|
||||
|
||||
}
|
||||
|
||||
private void internalReceive(String protocol, int NUMBER_OF_MESSAGES) throws Exception {
|
||||
private void internalReceive(String protocol, long NUMBER_OF_MESSAGES) throws Exception {
|
||||
Producer producer = (Producer)new Producer().setMessageSize(1000).setMessageCount(NUMBER_OF_MESSAGES).setTxBatchSize(1000);
|
||||
producer.setProtocol(protocol);
|
||||
producer.setSilentInput(true);
|
||||
|
@ -68,7 +68,7 @@ public class SmokePagingTest extends SmokeTestBase {
|
|||
consumer.setSilentInput(true);
|
||||
consumer.setReceiveTimeout(2000);
|
||||
consumer.setBreakOnNull(true);
|
||||
int consumed = (int)consumer.execute(new ActionContext());
|
||||
long consumed = (long)consumer.execute(new ActionContext());
|
||||
|
||||
Assert.assertEquals(NUMBER_OF_MESSAGES, consumed);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue