diff --git a/src/test/java/io/nats/client/impl/ErrorListenerTests.java b/src/test/java/io/nats/client/impl/ErrorListenerTests.java index 56eec0564..0615ce917 100644 --- a/src/test/java/io/nats/client/impl/ErrorListenerTests.java +++ b/src/test/java/io/nats/client/impl/ErrorListenerTests.java @@ -243,6 +243,7 @@ public void testDiscardedMessageFastProducer() throws Exception { maxMessagesInOutgoingQueue(maxMessages). discardMessagesWhenOutgoingQueueFull(). errorListener(handler). + pingInterval(Duration.ofSeconds(100)). // make this long so we don't ping during test build(); NatsConnection nc = (NatsConnection) Nats.connect(options); @@ -277,6 +278,7 @@ public void testDiscardedMessageServerClosed() throws Exception { server(ts.getURI()). maxMessagesInOutgoingQueue(maxMessages). discardMessagesWhenOutgoingQueueFull(). + pingInterval(Duration.ofSeconds(100)). // make this long so we don't ping during test connectionListener(handler). errorListener(handler). build();