From 552e4a2844fcaa5e983b2daee3408d584445e887 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Thu, 22 Mar 2018 16:06:17 -0400 Subject: [PATCH] NO-JIRA cleanup System.out on compatibility tests --- .../resources/addressConfig/artemisServer.groovy | 1 - .../addressConfig/receiveMessages.groovy | 1 - .../addressConfig/sendMessagesAddress.groovy | 2 -- .../main/resources/clients/artemisClient.groovy | 2 -- .../resources/exportimport/artemisServer.groovy | 3 --- .../src/main/resources/exportimport/export.groovy | 1 - .../main/resources/exportimport/export1X.groovy | 1 - .../src/main/resources/exportimport/import.groovy | 1 - .../main/resources/meshTest/sendMessages.groovy | 11 ----------- .../oldAddressSpace/artemisServer.groovy | 1 - .../oldAddressSpace/receiveMessages.groovy | 4 ---- .../oldAddressSpace/sendMessagesAddress.groovy | 6 ------ .../prefixSendAckTest/artemisServer.groovy | 3 --- .../prefixSendAckTest/sendAckMessages.groovy | 7 ------- .../resources/sendAckTest/sendAckMessages.groovy | 7 ------- .../src/main/resources/serial/jbmserial.groovy | 3 --- .../src/main/resources/serial/serial.groovy | 2 -- .../main/resources/servers/artemisServer.groovy | 4 ---- .../tests/compatibility/VersionedBaseTest.java | 15 +++++---------- 19 files changed, 5 insertions(+), 70 deletions(-) diff --git a/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy index 31faf3078a..0f85332d8d 100644 --- a/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/addressConfig/artemisServer.groovy @@ -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); diff --git a/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy b/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy index 06b825a5f7..0dbf4bac8b 100644 --- a/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy +++ b/tests/compatibility-tests/src/main/resources/addressConfig/receiveMessages.groovy @@ -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++) { diff --git a/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy b/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy index a1198b8522..b75f8f5d09 100644 --- a/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy +++ b/tests/compatibility-tests/src/main/resources/addressConfig/sendMessagesAddress.groovy @@ -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"); diff --git a/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy b/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy index 0926e0a420..54cd10a1b5 100644 --- a/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy +++ b/tests/compatibility-tests/src/main/resources/clients/artemisClient.groovy @@ -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 { diff --git a/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy index c6d7a7b1fa..92d2a10616 100644 --- a/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/exportimport/artemisServer.groovy @@ -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); diff --git a/tests/compatibility-tests/src/main/resources/exportimport/export.groovy b/tests/compatibility-tests/src/main/resources/exportimport/export.groovy index d7781a1efd..bad99e7530 100644 --- a/tests/compatibility-tests/src/main/resources/exportimport/export.groovy +++ b/tests/compatibility-tests/src/main/resources/exportimport/export.groovy @@ -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(); diff --git a/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy b/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy index f7ea1f278c..79b81c1285 100644 --- a/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy +++ b/tests/compatibility-tests/src/main/resources/exportimport/export1X.groovy @@ -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(); diff --git a/tests/compatibility-tests/src/main/resources/exportimport/import.groovy b/tests/compatibility-tests/src/main/resources/exportimport/import.groovy index d3be0e3e93..39481d5f73 100644 --- a/tests/compatibility-tests/src/main/resources/exportimport/import.groovy +++ b/tests/compatibility-tests/src/main/resources/exportimport/import.groovy @@ -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(); diff --git a/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy b/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy index 2e0e8a8b09..6a5e3709e3 100644 --- a/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy +++ b/tests/compatibility-tests/src/main/resources/meshTest/sendMessages.groovy @@ -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"); } diff --git a/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy index 85f661918d..40bacca270 100644 --- a/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/oldAddressSpace/artemisServer.groovy @@ -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); diff --git a/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy b/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy index 1594cc8a1a..632993f27f 100644 --- a/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy +++ b/tests/compatibility-tests/src/main/resources/oldAddressSpace/receiveMessages.groovy @@ -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 diff --git a/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy b/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy index 9ade9bbb0f..c24306e13c 100644 --- a/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy +++ b/tests/compatibility-tests/src/main/resources/oldAddressSpace/sendMessagesAddress.groovy @@ -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(); diff --git a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy index 7663c659a2..b85cfcf96f 100644 --- a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/artemisServer.groovy @@ -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); diff --git a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy index 9c945a6a8c..a24ad8305f 100644 --- a/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy +++ b/tests/compatibility-tests/src/main/resources/prefixSendAckTest/sendAckMessages.groovy @@ -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); } diff --git a/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy b/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy index 75751f16db..b0814cedd7 100644 --- a/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy +++ b/tests/compatibility-tests/src/main/resources/sendAckTest/sendAckMessages.groovy @@ -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); } diff --git a/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy b/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy index b80dddb469..02ee468af6 100644 --- a/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy +++ b/tests/compatibility-tests/src/main/resources/serial/jbmserial.groovy @@ -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"); diff --git a/tests/compatibility-tests/src/main/resources/serial/serial.groovy b/tests/compatibility-tests/src/main/resources/serial/serial.groovy index f5a3e5f3bc..7caa332603 100644 --- a/tests/compatibility-tests/src/main/resources/serial/serial.groovy +++ b/tests/compatibility-tests/src/main/resources/serial/serial.groovy @@ -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"); diff --git a/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy b/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy index 913c971b14..66614471ed 100644 --- a/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy +++ b/tests/compatibility-tests/src/main/resources/servers/artemisServer.groovy @@ -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); diff --git a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java index 9001180c60..96d96d73e5 100644 --- a/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java +++ b/tests/compatibility-tests/src/test/java/org/apache/activemq/artemis/tests/compatibility/VersionedBaseTest.java @@ -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();