NO-JIRA Removing logs from jms-tests
This commit is contained in:
parent
0abb06322c
commit
796a75c66d
|
@ -782,7 +782,7 @@ public class AcknowledgementTest extends JMSTestCase {
|
|||
messageReceived = (TextMessage) consumer.receiveNoWait();
|
||||
|
||||
if (messageReceived != null) {
|
||||
System.out.println("Message received " + messageReceived.getText());
|
||||
log.debug("Message received " + messageReceived.getText());
|
||||
}
|
||||
Assert.assertNull(messageReceived);
|
||||
|
||||
|
@ -1316,8 +1316,8 @@ public class AcknowledgementTest extends JMSTestCase {
|
|||
long time1 = consume(cf1, queue1, messageCount);
|
||||
long time2 = consume(cf2, queue2, messageCount);
|
||||
|
||||
log.info("BlockOnAcknowledge=false MessageCount=" + messageCount + " TimeToConsume=" + time1);
|
||||
log.info("BlockOnAcknowledge=true MessageCount=" + messageCount + " TimeToConsume=" + time2);
|
||||
log.debug("BlockOnAcknowledge=false MessageCount=" + messageCount + " TimeToConsume=" + time1);
|
||||
log.debug("BlockOnAcknowledge=true MessageCount=" + messageCount + " TimeToConsume=" + time2);
|
||||
|
||||
Assert.assertTrue(time1 < (time2 / 2));
|
||||
|
||||
|
|
|
@ -101,12 +101,12 @@ public abstract class ActiveMQServerTestCase {
|
|||
public TestRule watcher = new TestWatcher() {
|
||||
@Override
|
||||
protected void starting(Description description) {
|
||||
log.info(String.format("#*#*# Starting test: %s()...", description.getMethodName()));
|
||||
log.debug(String.format("#*#*# Starting test: %s()...", description.getMethodName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finished(Description description) {
|
||||
log.info(String.format("#*#*# Finished test: %s()...", description.getMethodName()));
|
||||
log.debug(String.format("#*#*# Finished test: %s()...", description.getMethodName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -57,7 +57,7 @@ public class AutoAckMessageListenerTest extends JMSTestCase {
|
|||
consumer.setMessageListener(listener);
|
||||
|
||||
// create and send messages
|
||||
log.info("Send and receive two message");
|
||||
log.debug("Send and receive two message");
|
||||
Message messageSent = session.createMessage();
|
||||
messageSent.setBooleanProperty("last", false);
|
||||
producer.send(messageSent);
|
||||
|
@ -67,7 +67,7 @@ public class AutoAckMessageListenerTest extends JMSTestCase {
|
|||
conn.start();
|
||||
|
||||
// wait until message is received
|
||||
log.info("waiting until message has been received by message listener...");
|
||||
log.debug("waiting until message has been received by message listener...");
|
||||
latch.await(10, TimeUnit.SECONDS);
|
||||
|
||||
// check message listener status
|
||||
|
@ -112,20 +112,20 @@ public class AutoAckMessageListenerTest extends JMSTestCase {
|
|||
public void onMessage(Message message) {
|
||||
try {
|
||||
if (message.getBooleanProperty("last") == false) {
|
||||
log.info("Received first message.");
|
||||
log.debug("Received first message.");
|
||||
if (message.getJMSRedelivered() == true) {
|
||||
// should not re-receive this one
|
||||
log.info("Error: received first message twice");
|
||||
log.debug("Error: received first message twice");
|
||||
passed = false;
|
||||
}
|
||||
} else {
|
||||
if (message.getJMSRedelivered() == false) {
|
||||
// received second message for first time
|
||||
log.info("Received second message. Calling recover()");
|
||||
log.debug("Received second message. Calling recover()");
|
||||
session.recover();
|
||||
} else {
|
||||
// should be redelivered after recover
|
||||
log.info("Received second message again as expected");
|
||||
log.debug("Received second message again as expected");
|
||||
passed = true;
|
||||
monitor.countDown();
|
||||
}
|
||||
|
|
|
@ -171,10 +171,10 @@ public class TransactedSessionTest extends JMSTestCase {
|
|||
MessageConsumer consumer = sess.createConsumer(ActiveMQServerTestCase.topic1);
|
||||
conn.start();
|
||||
|
||||
log.info("sending message first time");
|
||||
log.debug("sending message first time");
|
||||
TextMessage mSent = sess.createTextMessage("igloo");
|
||||
producer.send(mSent);
|
||||
log.info("sent message first time");
|
||||
log.debug("sent message first time");
|
||||
|
||||
sess.commit();
|
||||
|
||||
|
@ -183,10 +183,10 @@ public class TransactedSessionTest extends JMSTestCase {
|
|||
|
||||
sess.commit();
|
||||
|
||||
log.info("sending message again");
|
||||
log.debug("sending message again");
|
||||
mSent.setText("rollback");
|
||||
producer.send(mSent);
|
||||
log.info("sent message again");
|
||||
log.debug("sent message again");
|
||||
|
||||
sess.commit();
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ public class SelectorTest extends ActiveMQServerTestCase {
|
|||
prod.send(redMessage);
|
||||
prod.send(blueMessage);
|
||||
|
||||
log.info("sent message");
|
||||
log.debug("sent message");
|
||||
|
||||
Message rec = redConsumer.receive();
|
||||
ProxyAssertSupport.assertEquals(redMessage.getJMSMessageID(), rec.getJMSMessageID());
|
||||
|
@ -84,7 +84,7 @@ public class SelectorTest extends ActiveMQServerTestCase {
|
|||
|
||||
redConsumer.close();
|
||||
|
||||
log.info("closed first consumer");
|
||||
log.debug("closed first consumer");
|
||||
|
||||
MessageConsumer universalConsumer = session.createConsumer(queue1);
|
||||
|
||||
|
@ -191,7 +191,7 @@ public class SelectorTest extends ActiveMQServerTestCase {
|
|||
|
||||
ProxyAssertSupport.assertEquals("john", m.getStringProperty("beatle"));
|
||||
|
||||
log.info("Got message " + j);
|
||||
log.debug("Got message " + j);
|
||||
}
|
||||
|
||||
Message m = cons1.receiveNoWait();
|
||||
|
@ -902,38 +902,38 @@ public class SelectorTest extends ActiveMQServerTestCase {
|
|||
tm.setText("1");
|
||||
tm.setStringProperty("PROP1", "VALUE1");
|
||||
msgProducer.send(tm);
|
||||
System.out.println("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
log.debug("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
|
||||
tm = session.createTextMessage();
|
||||
tm.setText("2");
|
||||
tm.setStringProperty("PROP1", "VALUE1");
|
||||
msgProducer.send(tm);
|
||||
System.out.println("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
log.debug("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
|
||||
tm = session.createTextMessage();
|
||||
tm.setText("3");
|
||||
tm.setStringProperty("PROP2", "VALUE2");
|
||||
msgProducer.send(tm);
|
||||
System.out.println("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
log.debug("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
|
||||
tm = session.createTextMessage();
|
||||
tm.setText("4");
|
||||
tm.setStringProperty("PROP2", "VALUE2");
|
||||
msgProducer.send(tm);
|
||||
System.out.println("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
log.debug("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
|
||||
tm = session.createTextMessage();
|
||||
tm.setText("5");
|
||||
tm.setStringProperty("PROP1", "VALUE1");
|
||||
msgProducer.send(tm);
|
||||
System.out.println("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
log.debug("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
|
||||
tm = session.createTextMessage();
|
||||
tm.setText("6");
|
||||
tm.setStringProperty("PROP1", "VALUE1");
|
||||
tm.setStringProperty("PROP2", "VALUE2");
|
||||
msgProducer.send(tm);
|
||||
System.out.println("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
log.debug("Sent message with id [" + tm.getJMSMessageID() + "]");
|
||||
msgProducer.close();
|
||||
msgProducer = null;
|
||||
|
||||
|
|
|
@ -93,14 +93,14 @@ public class ServerManagement {
|
|||
" has not been created or has already been killed, so it cannot be killed");
|
||||
} else {
|
||||
Server server = ServerManagement.servers.get(i);
|
||||
ServerManagement.log.info("invoking kill() on server " + i);
|
||||
ServerManagement.log.debug("invoking kill() on server " + i);
|
||||
try {
|
||||
server.kill();
|
||||
} catch (Throwable t) {
|
||||
// This is likely to throw an exception since the server dies before the response is received
|
||||
}
|
||||
|
||||
ServerManagement.log.info("Waiting for server to die");
|
||||
ServerManagement.log.debug("Waiting for server to die");
|
||||
|
||||
try {
|
||||
while (true) {
|
||||
|
@ -114,7 +114,7 @@ public class ServerManagement {
|
|||
|
||||
Thread.sleep(300);
|
||||
|
||||
ServerManagement.log.info("server " + i + " killed and dead");
|
||||
ServerManagement.log.debug("server " + i + " killed and dead");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue