Skip to content

Commit

Permalink
Merge pull request wildfly#18028 from bstansberry/WFLY-19519
Browse files Browse the repository at this point in the history
[WFLY-19519] Work around inaccurate message counts in JMSQueueManagem…
  • Loading branch information
bstansberry authored Jul 11, 2024
2 parents 0b51b74 + 995d2ac commit 6656f3b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,12 @@ public void removeJMSQueueRemovesAllMessages() throws Exception {

MessageConsumer consumer = session.createConsumer(queue);

// Sanity check that there are messages to clean up when the queue is removed
ModelNode result = execute(getQueueOperation("count-messages"), true);
Assert.assertTrue(result.isDefined());
Assert.assertEquals(1, result.asInt());
// WFLY-19519 See issue description for possible reasons why the message count is on rare occasions 2
//Assert.assertEquals(1, result.asInt());
Assert.assertTrue(result.asInt() > 0);

// remove the queue
adminSupport.removeJmsQueue(getQueueName());
Expand Down

0 comments on commit 6656f3b

Please sign in to comment.