Skip to content

Commit

Permalink
ARTEMIS-4082: delete duplicate test, same as testDupsOKAcknowledgeQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmellr committed Apr 14, 2023
1 parent 114b88a commit 05f5af6
Showing 1 changed file with 0 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -635,66 +635,6 @@ public void testDupsOKAcknowledgeTopic() throws Exception {

}

/*
* Send some messages, consume them and verify the messages are not sent upon recovery
*/
@Test
public void testLazyAcknowledge() throws Exception {
Connection conn = createConnection();

Session producerSess = conn.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
MessageProducer producer = producerSess.createProducer(queue1);

Session consumerSess = conn.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
MessageConsumer consumer = consumerSess.createConsumer(queue1);
conn.start();

final int NUM_MESSAGES = 20;

// Send some messages
for (int i = 0; i < NUM_MESSAGES; i++) {
Message m = producerSess.createMessage();
producer.send(m);
}

assertRemainingMessages(NUM_MESSAGES);

logger.trace("Sent messages");

int count = 0;

Message m = null;
for (int i = 0; i < NUM_MESSAGES; i++) {
m = consumer.receive(200);
if (m == null) {
break;
}
count++;
}

ProxyAssertSupport.assertNotNull(m);

assertRemainingMessages(NUM_MESSAGES);

logger.trace("Received {} messages", count);

ProxyAssertSupport.assertEquals(count, NUM_MESSAGES);

consumerSess.recover();

logger.trace("Session recover called");

m = consumer.receiveNoWait();

logger.trace("Message is: {}", m);

ProxyAssertSupport.assertNull(m);

conn.close();

assertRemainingMessages(0);
}

@Test
public void testMessageListenerAutoAck() throws Exception {
Connection conn = createConnection();
Expand Down

0 comments on commit 05f5af6

Please sign in to comment.