ARTEMIS-3776 just my OCD applying aesthetic tweaks to recediveOW.groovy

This commit is contained in:
Clebert Suconic 2022-04-13 12:34:30 -04:00
parent bc17acd6da
commit ccfd4b7a62
2 changed files with 19 additions and 19 deletions

View File

@ -18,20 +18,17 @@
import org.apache.activemq.artemis.tests.compatibility.GroovyRun import org.apache.activemq.artemis.tests.compatibility.GroovyRun
import javax.jms.Connection
import javax.jms.MessageConsumer import javax.jms.MessageConsumer
import java.util.Date;
import java.util.UUID;
import javax.jms.ConnectionFactory;
import javax.jms.MessageProducer;
import javax.jms.Queue; import javax.jms.Queue;
import javax.jms.Session; import javax.jms.Session;
import javax.jms.TextMessage; import javax.jms.TextMessage;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
{
final ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(tcp://localhost:61616)"); final ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(tcp://localhost:61616)");
connection = cf.createConnection(); connection = cf.createConnection();
try {
final int numberOfMessages = Integer.parseInt(arg[0]) final int numberOfMessages = Integer.parseInt(arg[0])
final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
final Queue queue = session.createQueue("Test"); final Queue queue = session.createQueue("Test");
@ -43,4 +40,7 @@ for (int i = 0; i < numberOfMessages; i++) {
GroovyRun.assertNotNull(tm) GroovyRun.assertNotNull(tm)
GroovyRun.assertEquals("m" + i, tm.getText()); GroovyRun.assertEquals("m" + i, tm.getText());
} }
} finally {
connection.close(); connection.close();
}
}