[ 
https://issues.apache.org/jira/browse/ARTEMIS-4415?focusedWorklogId=880019&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-880019
 ]

ASF GitHub Bot logged work on ARTEMIS-4415:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Sep/23 16:07
            Start Date: 12/Sep/23 16:07
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #4602:
URL: https://github.com/apache/activemq-artemis/pull/4602#discussion_r1323269602


##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/LVQTest.java:
##########
@@ -167,11 +167,13 @@ public void testMultipleMessages() throws Exception {
       ClientMessage m = consumer.receive(1000);
       Assert.assertNotNull(m);
       m.acknowledge();
-      Assert.assertEquals(m.getBodyBuffer().readString(), "m3");
+      String val = m.getBodyBuffer().readString();
+      Assert.assertTrue("1 or 3 =? " + val, "m1".equals(val) || 
"m3".equals(val));

Review Comment:
   @gtully can't you instead make the test deterministic? like keeping 
consumers and senders on a certain condition that's required for the test?
   
   
   I had this issue in other tests... where I needed to verify the bindings 
were in place before asserting.. or the consumers were ready to receive with 
credits.. etc... 





Issue Time Tracking
-------------------

    Worklog Id:     (was: 880019)
    Time Spent: 20m  (was: 10m)

> org.apache.activemq.artemis.tests.integration.server.LVQTest#testMultipleMessages
>  fails intermittently
> ------------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-4415
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4415
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 2.30.0
>            Reporter: Gary Tully
>            Priority: Major
>             Fix For: 2.31.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> org.apache.activemq.artemis.tests.integration.server.LVQTest#testMultipleMessages
> it produces 4 messages in two last value groups and asserts that it can 
> consume the two last values in order.
> on occasion it only sees the first values



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to