NO-JIRA cleanup System.out on compatibility tests

This commit is contained in:
Clebert Suconic 2018-03-22 16:06:17 -04:00
parent 37657f22fa
commit 552e4a2844
19 changed files with 5 additions and 70 deletions

View File

@ -32,7 +32,6 @@ String id = "server"
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616?anycastPrefix=jms.queue.&multicastPrefix=jms.topic.");
configuration.setSecurityEnabled(false);

View File

@ -28,7 +28,6 @@ Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Queue queue = session.createQueue("myQueue");
System.out.println("Receiving ");
MessageConsumer consumer = session.createConsumer(queue)
connection.start()
for (int i = 0; i < 500; i++) {

View File

@ -26,7 +26,6 @@ Connection connection = cf.createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
Queue queue = session.createQueue("myQueue");
println("sending...")
MessageProducer producer = session.createProducer(queue);
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
@ -44,7 +43,6 @@ for (int i = 0; i < 500; i++) {
session.commit();
connection.close();
System.out.println("Message sent");

View File

@ -21,8 +21,6 @@ package clients
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
import org.apache.activemq.artemis.tests.compatibility.GroovyRun;
println("serverType " + serverArg[0]);
if (serverArg[0].startsWith("HORNETQ")) {
cf = new ActiveMQConnectionFactory("tcp://localhost:61616?protocolManagerFactoryStr=org.apache.activemq.artemis.core.protocol.hornetq.client.HornetQClientProtocolManagerFactory&confirmationWindowSize=1048576&blockOnDurableSend=false");
} else {

View File

@ -31,11 +31,8 @@ String type = arg[2];
String producer = arg[3];
String consumer = arg[4];
println("type = " + type);
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616");
configuration.setSecurityEnabled(false);

View File

@ -19,7 +19,6 @@ import org.apache.activemq.artemis.cli.commands.ActionContext
import org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataExporter
System.out.println("Arg::" + arg[0]);
File pagingfile = new File(arg[0] + "/sender/data/paging")
pagingfile.mkdirs()
XmlDataExporter exporter = new XmlDataExporter();

View File

@ -18,7 +18,6 @@
import org.apache.activemq.artemis.cli.commands.ActionContext
import org.apache.activemq.artemis.cli.commands.tools.XmlDataExporter
System.out.println("Arg::" + arg[0]);
File pagingfile = new File(arg[0] + "/sender/data/paging")
pagingfile.mkdirs()
XmlDataExporter exporter = new XmlDataExporter();

View File

@ -18,7 +18,6 @@ import org.apache.activemq.artemis.cli.commands.ActionContext
import org.apache.activemq.artemis.cli.commands.tools.xml.XmlDataImporter
System.out.println("Arg::" + arg[0]);
File pagingfile = new File(arg[0] + "/sender/data/paging")
pagingfile.mkdirs()
XmlDataImporter importer = new XmlDataImporter();

View File

@ -60,8 +60,6 @@ BYTES_BODY[2] = (byte) 0x77;
String textBody = "a rapadura e doce mas nao e mole nao";
println("serverType " + serverType);
if (clientType.startsWith("ARTEMIS")) {
// Can't depend directly on artemis, otherwise it wouldn't compile in hornetq
GroovyRun.evaluate("clients/artemisClient.groovy", "serverArg", serverType);
@ -84,12 +82,9 @@ if (operation.equals("sendTopic") || operation.equals("receiveNonDurableSubscrip
if (operation.equals("sendAckMessages") || operation.equals("sendTopic")) {
println("sending...")
MessageProducer producer = session.createProducer(destination);
producer.setDeliveryMode(DeliveryMode.PERSISTENT);
System.out.println("Sending messages");
TextMessage message = session.createTextMessage(textBody);
message.setStringProperty(HDR_DUPLICATE_DETECTION_ID, "some-duplicate");
message.setStringProperty("prop", "test");
@ -136,7 +131,6 @@ if (operation.equals("sendAckMessages") || operation.equals("sendTopic")) {
session.commit();
connection.close();
System.out.println("Message sent");
}
if (operation.equals("receiveMessages") || operation.equals("receiveNonDurableSubscription")) {
@ -149,8 +143,6 @@ if (operation.equals("receiveMessages") || operation.equals("receiveNonDurableSu
latch.countDown();
}
System.out.println("Receiving messages");
TextMessage message = (TextMessage) consumer.receive(5000);
GroovyRun.assertNotNull(message);
GroovyRun.assertEquals(textBody, message.getText());
@ -174,8 +166,6 @@ if (operation.equals("receiveMessages") || operation.equals("receiveNonDurableSu
byte[] data = new byte[1024];
System.out.println("Message = " + rm);
for (int i = 0; i < LARGE_MESSAGE_SIZE; i += 1024) {
int numberOfBytes = rm.readBytes(data);
GroovyRun.assertEquals(1024, numberOfBytes);
@ -206,7 +196,6 @@ if (operation.equals("receiveMessages") || operation.equals("receiveNonDurableSu
session.commit();
connection.close();
System.out.println("Message received");
}

View File

@ -39,7 +39,6 @@ String topicAddress = "jms.topic.myTopic";
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616");
configuration.setSecurityEnabled(false);

View File

@ -41,8 +41,6 @@ if (clientType.startsWith("ARTEMIS-1") || clientType.startsWith("HORNETQ")) {
topic = session.createTopic("jms.topic.myTopic");
}
System.out.println("Receiving...");
MessageConsumer topicConsumer = session.createDurableSubscriber(topic, "myDurableSub")
MessageConsumer queueConsumer = session.createConsumer(queue)
@ -57,7 +55,6 @@ for (int i = 0; i < 500; i++) {
}
}
session.commit();
System.out.println("Consumed all messages from Queue");
for (int i = 0; i < 500; i++) {
BytesMessage bytesMessage = (BytesMessage) topicConsumer.receive(5000);
@ -67,7 +64,6 @@ for (int i = 0; i < 500; i++) {
}
}
session.commit();
System.out.println("Consumed all messages from Topic");
// Defined on AddressConfigTest.java at the test with setVariable

View File

@ -38,12 +38,9 @@ if (clientType.startsWith("ARTEMIS-1") || clientType.startsWith("HORNETQ")) {
topic = session.createTopic("jms.topic.myTopic");
}
System.out.println("Receiving ");
MessageProducer queueProducer = session.createProducer(queue)
MessageProducer topicProducer = session.createProducer(topic);
println("sending...")
queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
for (int i = 0; i < 500; i++) {
BytesMessage bytesMessage = session.createBytesMessage();
@ -56,7 +53,6 @@ for (int i = 0; i < 500; i++) {
}
}
session.commit();
println("Sent Queue Messages.")
queueProducer.setDeliveryMode(DeliveryMode.PERSISTENT);
for (int i = 0; i < 500; i++) {
@ -70,10 +66,8 @@ for (int i = 0; i < 500; i++) {
}
}
session.commit();
println("Sent Topic Messages.")
connection.close();
System.out.println("All Messages sent");
senderLatch.countDown();

View File

@ -31,11 +31,8 @@ String type = arg[2];
String producer = arg[3];
String consumer = arg[4];
println("type = " + type);
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616");
configuration.setSecurityEnabled(false);

View File

@ -39,8 +39,6 @@ if (clientType.equals(GroovyRun.SNAPSHOT) || clientType.equals(GroovyRun.TWO_FOU
String textBody = "a rapadura e doce mas nao e mole nao";
println("serverType " + serverType);
if (clientType.startsWith("ARTEMIS")) {
// Can't depend directly on artemis, otherwise it wouldn't compile in hornetq
GroovyRun.evaluate("clients/artemisClient.groovy", "serverArg", serverType);
@ -78,15 +76,11 @@ if (operation.equals("sendAckMessages")) {
GroovyRun.assertTrue(latch.await(10, TimeUnit.SECONDS));
System.out.println("Sending messages");
connection.close();
System.out.println("Message sent");
} else if (operation.equals("receiveMessages")) {
MessageConsumer consumer = session.createConsumer(queue);
connection.start();
System.out.println("Receiving messages");
for (int i = 0; i < 10; i++) {
TextMessage message = consumer.receive(1000);
GroovyRun.assertNotNull(message);
@ -95,7 +89,6 @@ if (operation.equals("sendAckMessages")) {
GroovyRun.assertNull(consumer.receiveNoWait());
connection.close();
System.out.println("Message received");
} else {
throw new RuntimeException("Invalid operation " + operation);
}

View File

@ -34,8 +34,6 @@ String queueName = "queue";
String textBody = "a rapadura e doce mas nao e mole nao";
println("serverType " + serverType);
if (clientType.startsWith("ARTEMIS")) {
// Can't depend directly on artemis, otherwise it wouldn't compile in hornetq
GroovyRun.evaluate("clients/artemisClient.groovy", "serverArg", serverType);
@ -73,15 +71,11 @@ if (operation.equals("sendAckMessages")) {
GroovyRun.assertTrue(latch.await(10, TimeUnit.SECONDS));
System.out.println("Sending messages");
connection.close();
System.out.println("Message sent");
} else if (operation.equals("receiveMessages")) {
MessageConsumer consumer = session.createConsumer(queue);
connection.start();
System.out.println("Receiving messages");
for (int i = 0; i < 10; i++) {
TextMessage message = consumer.receive(1000);
GroovyRun.assertNotNull(message);
@ -90,7 +84,6 @@ if (operation.equals("sendAckMessages")) {
GroovyRun.assertNull(consumer.receiveNoWait());
connection.close();
System.out.println("Message received");
} else {
throw new RuntimeException("Invalid operation " + operation);
}

View File

@ -32,9 +32,6 @@ import org.apache.activemq.artemis.jms.client.*
file = arg[0]
method = arg[1]
version = arg[2]
System.out.println("File::" + file);
// Get the factory for the "river" marshalling protocol
final MarshallerFactory factory = Marshalling.getProvidedMarshallerFactory("river");

View File

@ -25,8 +25,6 @@ import org.apache.activemq.artemis.jms.client.*
file = arg[0]
method = arg[1]
version = arg[2]
System.out.println("File::" + file)
if (method.equals("write")) {
cf = new ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=1048576&blockOnDurableSend=false");

View File

@ -34,12 +34,8 @@ String producer = arg[3];
String consumer = arg[4];
String globalMaxSize = arg[5];
println("type = " + type);
println("globalMaxSize = " + globalMaxSize);
configuration = new ConfigurationImpl();
configuration.setJournalType(JournalType.NIO);
System.out.println("folder:: " + folder);
configuration.setBrokerInstance(new File(folder + "/" + id));
configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616?anycastPrefix=jms.queue.&multicastPrefix=jms.topic.");
configuration.setSecurityEnabled(false);

View File

@ -155,16 +155,13 @@ public abstract class VersionedBaseTest {
boolean ok = value != null && !value.trim().isEmpty();
if (!ok) {
System.out.println("Add \"-D" + name + "=\'CLASSPATH\'\" into your VM settings");
} else {
printed.add(name);
System.out.println("****************************************************************************");
System.out.println("* If you want to debug this test, add this parameter to your IDE run settings...");
System.out.println("****************************************************************************");
System.out.println("-D" + name + "=\"" + value + "\"");
System.out.println("****************************************************************************");
System.out.println("You will see it in the output from mvn install at the compatibility-tests");
System.out.println("... look for output from dependency-scan");
// our dependency scan used at the pom under compatibility-tests/pom.xml will generate these, example:
// [INFO] dependency-scan setting: -DARTEMIS-140="/Users/someuser/....."
// copy that into your IDE setting and you should be able to debug it
}
Assume.assumeTrue("Cannot run these tests, no classpath found", ok);
}
@ -195,8 +192,6 @@ public abstract class VersionedBaseTest {
public void startServer(File folder, ClassLoader loader, String serverName, String globalMaxSize) throws Throwable {
folder.mkdirs();
System.out.println("Folder::" + folder);
String scriptToUse;
if (getServerScriptToUse() != null && getServerScriptToUse().length() != 0) {
scriptToUse = getServerScriptToUse();