[AMQ-2100] fix for intermittent ci failure

This commit is contained in:
gtully 2017-05-03 12:31:09 +01:00
parent c4a1346875
commit 35f30102a6
1 changed files with 4 additions and 1 deletions

View File

@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.BytesMessage;
import javax.jms.IllegalStateException;
import javax.jms.JMSException;
import javax.jms.DeliveryMode;
import javax.jms.Message;
@ -161,7 +162,9 @@ public class JMSConsumerTest extends JmsTestSupport {
if (count % 200 == 0) {
// ensure there are some outstanding messages
// ack every 200
message.acknowledge();
try {
message.acknowledge();
} catch (IllegalStateException okForAck) {}
}
} catch (Exception e) {
LOG.error("Exception on close or ack:", e);