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

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

                Author: ASF GitHub Bot
            Created on: 04/Mar/24 23:57
            Start Date: 04/Mar/24 23:57
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on code in PR #4840:
URL: https://github.com/apache/activemq-artemis/pull/4840#discussion_r1511954720


##########
artemis-protocols/artemis-amqp-protocol/src/test/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPTunneledCoreLargeMessageReaderTest.java:
##########
@@ -116,21 +128,19 @@ public void 
testReadDeliveryAnnotationsFromDeliveryBuffer() throws Exception {
 
       reader.open();
 
-      assertNull(reader.getDeliveryAnnotations());
-
       try {
+         readMessage = null;
          reader.readBytes(delivery);
+         Assert.assertNull(readMessage); // should not been called yet
       } catch (IllegalStateException e) {
          fail("Should not throw as the reader should be able to read just 
delivery annotations.");
       }
 
-      assertNotNull(reader.getDeliveryAnnotations());
-
-      final DeliveryAnnotations annotations = reader.getDeliveryAnnotations();
-
-      assertTrue(annotations.getValue().get(Symbol.valueOf("a")).equals("a"));
-      assertTrue(annotations.getValue().get(Symbol.valueOf("b")).equals("b"));
-      assertTrue(annotations.getValue().get(Symbol.valueOf("c")).equals("c"));
+      // peek current delivery annotations
+      DeliveryAnnotations currentAnnotations = reader.getDeliveryAnnotations();

Review Comment:
   The readMethod now calls close when there's no more pending. that is the 
onMessageComplete is called and the reader is closed. Meaning the test here 
would call getDeliveryAnnotations and it wouldn't be here.
   
   the only case where getDeliveryAnnotations will return anything is if the 
read it still partial now.





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

    Worklog Id:     (was: 908200)
    Time Spent: 2h  (was: 1h 50m)

> Move AMQP Large Message File Handling away from Netty thread
> ------------------------------------------------------------
>
>                 Key: ARTEMIS-4668
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4668
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.32.0
>            Reporter: Clebert Suconic
>            Assignee: Clebert Suconic
>            Priority: Major
>             Fix For: 2.33.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Operations like file.open, file.close, and file.sync should be moved away 
> from the Netty Thread for AMQP Large Messages
> This task now is about moving the processing for AMQP Messages. we may in a 
> near future also improve tunneled large messages. For now we will do for AMQP 
> messages only.



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

Reply via email to