mirror of https://github.com/apache/activemq.git
tidy up the tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@490807 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
81920f61cc
commit
63d78acccc
|
@ -127,12 +127,25 @@ public abstract class CursorSupport extends TestCase{
|
||||||
producer.send(msg);
|
producer.send(msg);
|
||||||
}
|
}
|
||||||
latch.await(300000,TimeUnit.MILLISECONDS);
|
latch.await(300000,TimeUnit.MILLISECONDS);
|
||||||
|
producerConnection.close();
|
||||||
|
consumerConnection.close();
|
||||||
assertEquals("Still dipatching - count down latch not sprung",latch.getCount(),0);
|
assertEquals("Still dipatching - count down latch not sprung",latch.getCount(),0);
|
||||||
assertEquals("cosumerList - expected: "+MESSAGE_COUNT+" but was: "+consumerList.size(),consumerList.size(),
|
assertEquals("cosumerList - expected: "+MESSAGE_COUNT+" but was: "+consumerList.size(),consumerList.size(),
|
||||||
senderList.size());
|
senderList.size());
|
||||||
assertEquals(senderList,consumerList);
|
for (int i =0; i < senderList.size(); i++) {
|
||||||
producerConnection.close();
|
Message sent = (Message)senderList.get(i);
|
||||||
consumerConnection.close();
|
Message consumed = (Message)consumerList.get(i);
|
||||||
|
if (!sent.equals(consumed)) {
|
||||||
|
System.err.println("BAD MATCH AT POS " + i);
|
||||||
|
System.err.println(sent);
|
||||||
|
System.err.println(consumed);
|
||||||
|
System.err.println("\n\n\n\n\n");
|
||||||
|
for (int j = 0; j < consumerList.size(); j++) {
|
||||||
|
System.err.println(consumerList.get(j));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assertEquals("This should be the same at pos " + i + " in the list",sent.getJMSMessageID(),consumed.getJMSMessageID());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Connection getConsumerConnection(ConnectionFactory fac) throws JMSException{
|
protected Connection getConsumerConnection(ConnectionFactory fac) throws JMSException{
|
||||||
|
|
|
@ -35,6 +35,6 @@ public class KahaCursorDurableTest extends CursorDurableTest{
|
||||||
KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/durableTest"));
|
KahaPersistenceAdapter adaptor = new KahaPersistenceAdapter(new File("activemq-data/durableTest"));
|
||||||
answer.setPersistenceAdapter(adaptor);
|
answer.setPersistenceAdapter(adaptor);
|
||||||
answer.addConnector(bindAddress);
|
answer.addConnector(bindAddress);
|
||||||
//answer.setDeleteAllMessagesOnStartup(true);
|
answer.setDeleteAllMessagesOnStartup(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue