dimitribekale opened a new issue, #2706:
URL: https://github.com/apache/activemq/issues/2706

   **Component:** activemq-http (test)
   **Version:** present on `main` as of 2026-10-19, commit `644cf4fd`
   
   ### Description
   
   
[`HttpMaxFrameSizeTest.sendOversizedMessageTest()`](https://github.com/apache/activemq/blob/644cf4fddff081837c1baeb2823d2a409185e11d/activemq-http/src/test/java/org/apache/activemq/transport/http/HttpMaxFrameSizeTest.java#L53-L60)
 sends a 5000-byte message to a connector configured with `maxFrameSize=4000` 
and asserts on the resulting `JMSException`, but nothing fails the test when no 
exception is thrown:
   
   ```java
   try {
         send(5000);
   } catch (JMSException jmsException) {
        Assert.assertTrue(jmsException.getMessage().contains("405 Method Not 
Allowed"));
   }
   
   If the frame-size limit stops being enforced, send(5000) returns normally, 
the
   catch block never runs, and the test passes. The assertion inside the catch 
is the
   only check in the method.
   
   Impact
   
   Test-only: no runtime effect. The cost is lost regression coverage; this 
test is what guards the behaviour added in AMQ-7327 and refined in AMQ-7419 
(405 instead of 500 on oversized frames), and in its current form it cannot 
fail when that behaviour regresses.
   
   Proposed fix
   
        public void sendOversizedMessageTest() throws Exception {
            try {
                send(5000);
   +          Assert.fail("Expected JMSException: maxFrameSize should have been 
enforced");
            } catch (JMSException jmsException) {
                Assert.assertTrue(jmsException.getMessage().contains("405 
Method Not Allowed"));
            }
        }
   
   I searched the open and closed issues and found no existing report. Happy to 
open a PR with the fix if it is welcomed. 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to