mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3576 - tidying up the test
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1196710 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
70057cb9ce
commit
aa8bc42fd4
|
@ -169,7 +169,6 @@ public class SoWriteTimeoutTest extends JmsTestSupport {
|
||||||
ActiveMQConnectionFactory pFactory = new ActiveMQConnectionFactory("failover:(" + proxy.getUrl() + "?soWriteTimeout=500)?jms.useAsyncSend=true&trackMessages=true");
|
ActiveMQConnectionFactory pFactory = new ActiveMQConnectionFactory("failover:(" + proxy.getUrl() + "?soWriteTimeout=500)?jms.useAsyncSend=true&trackMessages=true");
|
||||||
final Connection pc = pFactory.createConnection();
|
final Connection pc = pFactory.createConnection();
|
||||||
pc.start();
|
pc.start();
|
||||||
System.out.println("Pausing proxy");
|
|
||||||
proxy.pause();
|
proxy.pause();
|
||||||
|
|
||||||
final int messageCount = 20;
|
final int messageCount = 20;
|
||||||
|
@ -178,9 +177,7 @@ public class SoWriteTimeoutTest extends JmsTestSupport {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
System.out.println("sending messages");
|
|
||||||
sendMessages(pc, dest, messageCount);
|
sendMessages(pc, dest, messageCount);
|
||||||
System.out.println("messages sent");
|
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
ignored.printStackTrace();
|
ignored.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -189,7 +186,6 @@ public class SoWriteTimeoutTest extends JmsTestSupport {
|
||||||
|
|
||||||
// wait for timeout and reconnect
|
// wait for timeout and reconnect
|
||||||
TimeUnit.SECONDS.sleep(7);
|
TimeUnit.SECONDS.sleep(7);
|
||||||
System.out.println("go on");
|
|
||||||
proxy.goOn();
|
proxy.goOn();
|
||||||
for (int i=0; i<messageCount; i++) {
|
for (int i=0; i<messageCount; i++) {
|
||||||
assertNotNull("Got message after reconnect", consumer.receive(5000));
|
assertNotNull("Got message after reconnect", consumer.receive(5000));
|
||||||
|
|
Loading…
Reference in New Issue