[GitHub] activemq-artemis pull request #1625: ARTEMIS-1490 Race on address delete

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis pull request #1625: ARTEMIS-1490 Race on address delete

pgfox
GitHub user clebertsuconic opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1625

    ARTEMIS-1490 Race on address delete

   

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/clebertsuconic/activemq-artemis race-address

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1625.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1625
   
----
commit fbe659809e442aba6acf1cc8065fbdcdea04f8bb
Author: Clebert Suconic <[hidden email]>
Date:   2017-10-30T21:04:10Z

    ARTEMIS-1490 Race on address delete

----


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1625: ARTEMIS-1490 Race on address delete

pgfox
Github user mtaylor commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1625
 
    @clebertsuconic This looks good.  We need a test before merging.  I will write one here and open a PR against your branch.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1625: ARTEMIS-1490 Race on address delete

pgfox
In reply to this post by pgfox
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1625
 
    @mtaylor there is a test... on ConsumerTest.


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis pull request #1625: ARTEMIS-1490 Race on address delete

pgfox
In reply to this post by pgfox
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1625#discussion_r147988765
 
    --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java ---
    @@ -261,6 +261,42 @@ public void testAutoCreateMulticastAddress() throws Throwable {
        }
     
        @Test
    +   public void testAutoCreateCOnConsumer() throws Throwable {
    --- End diff --
   
    @mtaylor  **there is** a test here ^^


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis pull request #1625: ARTEMIS-1490 Race on address delete

pgfox
In reply to this post by pgfox
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1625#discussion_r147988933
 
    --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java ---
    @@ -261,6 +261,42 @@ public void testAutoCreateMulticastAddress() throws Throwable {
        }
     
        @Test
    +   public void testAutoCreateCOnConsumer() throws Throwable {
    +
    +      final SimpleString thisQueue = SimpleString.toSimpleString("ThisQueue");
    +      if (!isNetty()) {
    +         // no need to run the test, there's no AMQP support
    +         return;
    +      }
    +
    +      for (int i = 0; i < 10; i++) {
    +         ConnectionFactory factorySend = createFactory(2);
    +         Connection connection = factorySend.createConnection();
    +
    +         try {
    +            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    +            javax.jms.Queue queue = session.createQueue(thisQueue.toString());
    +            MessageProducer producer = session.createProducer(queue);
    +
    +            MessageConsumer consumer = session.createConsumer(queue);
    +            connection.start();
    +
    +            producer.send(session.createTextMessage("hello"));
    +
    +            Assert.assertNotNull(consumer.receive(5000));
    +            consumer.close();
    +            session.close();
    +         } finally {
    +            connection.close();
    +         }
    +
    +         Wait.waitFor(() -> server.getAddressInfo(thisQueue) == null, 1000, 10);
    --- End diff --
   
    @mtaylor without that change, this will always fail on this loop (at least on my laptop).


---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis pull request #1625: ARTEMIS-1490 Race on address delete

pgfox
In reply to this post by pgfox
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1625


---