Fix AttachmentMtomChunkingTest port collision with AttachmentChunkingTest#2972
Open
Fix AttachmentMtomChunkingTest port collision with AttachmentChunkingTest#2972
Conversation
reta
reviewed
Mar 13, 2026
|
|
||
| public class AttachmentMtomChunkingTest extends AbstractAttachmentChunkingTest { | ||
| private static final String PORT = allocatePort(DownloadServer.class); | ||
| private static final String PORT = allocatePort(AttachmentMtomChunkingTest.class); |
Member
There was a problem hiding this comment.
This is great finding @gnodet , however I think we would have to address the cause:
allocatePort()sets two properties, with full class name, and simple class name- the conflict is apparently over simple class name
It would be beneficial to improve TestUtil to catch those conflicts (it can do it, properties are static), so the test suite fails to run and would need to be fixed. Wdyt?
…Test Both tests have an inner class named DownloadServer and use allocatePort(DownloadServer.class). Since TestUtil stores ports under the simple class name, both tests get the same port, causing ListenerRegistrationException when the second test tries to publish its endpoint. Fix by using allocatePort(AttachmentMtomChunkingTest.class) to get a distinct port. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2555f2a to
d188dbc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AttachmentChunkingTestandAttachmentMtomChunkingTesthave inner classes namedDownloadServerallocatePort(DownloadServer.class)which resolves to the same port viaTestUtil(stores under the simple class nameDownloadServer)ListenerRegistrationException: Soap 1.1 endpoint already registered on addressallocatePort(AttachmentMtomChunkingTest.class)to get a distinct portTest plan
AttachmentChunkingTestandAttachmentMtomChunkingTestpass in the same surefire fork🤖 Generated with Claude Code