[ 
https://issues.apache.org/jira/browse/ARTEMIS-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15338897#comment-15338897
 ] 

ASF GitHub Bot commented on ARTEMIS-571:
----------------------------------------

Github user gaohoward commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/581#discussion_r67630013
  
    --- Diff: 
tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java
 ---
    @@ -157,9 +157,9 @@ public void testTwoConsumers() throws Exception {
           // now lets receive it
           MessageConsumer consumer1 = session.createConsumer(queue);
           MessageConsumer consumer2 = session.createConsumer(queue);
    -      TextMessage answer = (TextMessage) consumer1.receiveNoWait();
    +      TextMessage answer = (TextMessage) consumer1.receive(5000);
           assertEquals("Should have received a message!", answer.getText(), 
"Msg1");
    -      answer = (TextMessage) consumer2.receiveNoWait();
    +      answer = (TextMessage) consumer2.receive(5000);
    --- End diff --
    
    @clebertsuconic yes something is async. If you following session.commit() 
at server, it's async, which means after commit you can't expect the message is 
already at client side. You have to give it some time to allow messages to be 
delivered to the client. Using receiveNoWait() is not proper here.


> Redelivery test failures fix and Regression
> -------------------------------------------
>
>                 Key: ARTEMIS-571
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-571
>             Project: ActiveMQ Artemis
>          Issue Type: Sub-task
>          Components: OpenWire
>    Affects Versions: 1.2.0
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>             Fix For: 1.4.0
>
>
> There are a bunch of redelivery-counter related issues scattered in the 
> testsuites that need fix. Also there is a regression causes test failure. The 
> reason is that for temp queues the prefix should be
> jms.tempqueue.<amq5 queuename>. Previously we use jms.queue. prefix for all 
> queues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to