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

    https://github.com/apache/activemq-artemis/pull/1110#discussion_r107030877
  
    --- Diff: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/SendingAndReceivingTest.java
 ---
    @@ -91,6 +95,45 @@ public void testSendingBigMessage() throws Exception {
           }
        }
     
    +   @Test(timeout = 60000)
    +   public void testSendMessageThenAllowToExpireUsingTimeToLive() throws 
Exception {
    +      AddressSettings as = new AddressSettings();
    +      as.setExpiryAddress(SimpleString.toSimpleString("DLQ"));
    +      HierarchicalRepository<AddressSettings> repos = 
server.getAddressSettingsRepository();
    +      repos.addMatch("exampleQueue", as);
    +
    +      Connection connection = null;
    +      ConnectionFactory connectionFactory = new 
JmsConnectionFactory("amqp://localhost:61616");
    +
    +      try {
    +         connection = connectionFactory.createConnection();
    +         Session session = connection.createSession(false, 
Session.AUTO_ACKNOWLEDGE);
    +         String address = "exampleQueue";
    +         Queue queue = session.createQueue(address);
    +
    +         MessageProducer sender = session.createProducer(queue);
    +         sender.setTimeToLive(10);
    +
    +         Message message = session.createMessage();
    +         sender.send(message);
    +         connection.start();
    +
    +         MessageConsumer consumer = session.createConsumer(queue);
    +         Message m = consumer.receive(5000);
    --- End diff --
    
    there must be a way to not to spend 5s waiting here


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to