ARTEMIS-3776 just my OCD applying aesthetic tweaks to recediveOW.groovy
This commit is contained in:
parent
bc17acd6da
commit
ccfd4b7a62
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue