You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "gtully (via GitHub)" <gi...@apache.org> on 2023/09/01 15:24:02 UTC

[GitHub] [activemq-artemis] gtully opened a new pull request, #4602: ARTEMIS-4415 accept indeterminism of broker dispatch

gtully opened a new pull request, #4602:
URL: https://github.com/apache/activemq-artemis/pull/4602

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] clebertsuconic commented on a diff in pull request #4602: ARTEMIS-4415 accept indeterminism of broker dispatch

Posted by "clebertsuconic (via GitHub)" <gi...@apache.org>.
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... 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] gemmellr commented on a diff in pull request #4602: ARTEMIS-4415 accept indeterminism of broker dispatch

Posted by "gemmellr (via GitHub)" <gi...@apache.org>.
gemmellr commented on code in PR #4602:
URL: https://github.com/apache/activemq-artemis/pull/4602#discussion_r1313196744


##########
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:
   This doesnt seem like a desirable change for an LVQ test. It would then be about as well deleted it for all the good it would really be doing in verifying the 'LV' bit.
   
   It currently creates the consumer before sending so it seems rather pot-luck what it will see. The next test creates it after, and also checks the count as you said. Or it could use a transacted producer for the 'second round' of sends. Something synchronous between send and check, basically.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] gtully commented on pull request #4602: ARTEMIS-4415 accept indeterminism of broker dispatch

Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully commented on PR #4602:
URL: https://github.com/apache/activemq-artemis/pull/4602#issuecomment-1702932353

   make me wonder what is actually being verified, at the point of clientsession start, it is not possible to know the state of the broker unless we wait for some metric, maybe wait to count == 2. 
   It was breaking after a few thousand iterations for me and now is not, but to some end, it is now verifying two things!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] gtully commented on a diff in pull request #4602: ARTEMIS-4415 accept indeterminism of broker dispatch

Posted by "gtully (via GitHub)" <gi...@apache.org>.
gtully commented on code in PR #4602:
URL: https://github.com/apache/activemq-artemis/pull/4602#discussion_r1319633011


##########
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:
   I think the crux is that the broker decides what is the LV, and it is non deterministic in this case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ARTEMIS-4415 accept indeterminism of broker dispatch [artemis]

Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram commented on PR #4602:
URL: https://github.com/apache/artemis/pull/4602#issuecomment-3720543920

   I believe this was fixed via da861bd6fd00bef0b96cc4be42c800099bcd3b4c which made the test deterministic since it now waits for the expected message count, messages added, and messages replaced before attempting to consume.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org


[GitHub] [activemq-artemis] gemmellr commented on a diff in pull request #4602: ARTEMIS-4415 accept indeterminism of broker dispatch

Posted by "gemmellr (via GitHub)" <gi...@apache.org>.
gemmellr commented on code in PR #4602:
URL: https://github.com/apache/activemq-artemis/pull/4602#discussion_r1313196744


##########
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:
   This doesnt seem like a desirable change for an LVQ test. It would then be about as well deleted for all the good it would really be doing in verifying the 'LV' bit.
   
   It currently creates the consumer before sending so it seems rather pot-luck what it will see. The next test creates it after, and also checks the count as you said. Or it could use a transacted producer for the 'second round' of sends. Something synchronous between send and check, basically.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [activemq-artemis] gemmellr commented on a diff in pull request #4602: ARTEMIS-4415 accept indeterminism of broker dispatch

Posted by "gemmellr (via GitHub)" <gi...@apache.org>.
gemmellr commented on code in PR #4602:
URL: https://github.com/apache/activemq-artemis/pull/4602#discussion_r1319865619


##########
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:
   It is currently but per your comment and other tests it could probably be made deterministic. Instead, with this change the test wouldnt really be verifying anything much at all.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ARTEMIS-4415 accept indeterminism of broker dispatch [artemis]

Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram closed pull request #4602: ARTEMIS-4415 accept indeterminism of broker dispatch
URL: https://github.com/apache/artemis/pull/4602


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org