HttpMaxFrameSizeTest.sendOversizedMessageTest() passes silently when maxFrameSize is not enforced
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 90/100
Research direction
Read activemq-http/src/test/java/org/apache/activemq/transport/http/HttpMaxFrameSizeTest.java, especially sendOversizedMessageTest(). Run that test and check that it fails if send(5000) returns normally; done means the test requires a JMSException and verifies its message contains “405 Method Not Allowed”.
Written by the indexing model from the issue text.
Description
Component: activemq-http (test)
Version: present on main as of 2026-10-19, commit 644cf4fd
Description
HttpMaxFrameSizeTest.sendOversizedMessageTest() 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:
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.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1.5k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 73
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/activemq
-
Treat socketBufferSize=0 as OS default without logging a warningPossibly taken @mwashburn2 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
ServerSessionImpl gets stuck if the WorkManager encounteres a RejectedExecutionExceptionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
apache/activemq#2647 · 5 comments ·
Maintainers usually reply within 1 day
-
AmqpMessage.reject() throws "Can't release non-received message." (copy-paste from release())Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
apache/activemq#2623 · 5 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/activemq#2558 · 2 comments ·
Maintainers usually reply within 1 day
-
Stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/activemq#1999 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
area/kotlin
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Large page[number] overflows the computed offset and returns the wrong pagePossibly taken @auraseb claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100