mirror of https://github.com/apache/activemq.git
AMQ-2910 fix timing on test timeout - ensure consumer connection is started
This commit is contained in:
parent
a9c7f7122b
commit
a0d05f8ea3
|
@ -185,10 +185,10 @@ public class JmsMultipleClientsTestSupport {
|
|||
|
||||
protected MessageConsumer createMessageConsumer(Connection conn, Destination dest) throws Exception {
|
||||
connections.add(conn);
|
||||
conn.start();
|
||||
|
||||
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||
final MessageConsumer consumer = sess.createConsumer(dest);
|
||||
conn.start();
|
||||
|
||||
return consumer;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class AMQ2910Test extends JmsMultipleClientsTestSupport {
|
|||
return broker;
|
||||
}
|
||||
|
||||
@Test(timeout = 60 * 1000)
|
||||
@Test(timeout = 120 * 1000)
|
||||
public void testConcurrentSendToPendingCursor() throws Exception {
|
||||
final ActiveMQConnectionFactory factory =
|
||||
new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri());
|
||||
|
@ -102,9 +102,9 @@ public class AMQ2910Test extends JmsMultipleClientsTestSupport {
|
|||
}
|
||||
|
||||
executor.shutdown();
|
||||
assertTrue("consumers completed", executor.awaitTermination(60, TimeUnit.SECONDS));
|
||||
assertTrue("consumers completed", executor.awaitTermination(30, TimeUnit.SECONDS));
|
||||
|
||||
allMessagesList.setMaximumDuration(120*1000);
|
||||
allMessagesList.setMaximumDuration(90*1000);
|
||||
final int numExpected = maxConcurrency * msgCount;
|
||||
allMessagesList.waitForMessagesToArrive(numExpected);
|
||||
|
||||
|
|
Loading…
Reference in New Issue