nzw921rx commented on PR #11574:
URL: https://github.com/apache/seatunnel/pull/11574#issuecomment-5126789848

   Thanks for the suggestion. I agree that the same-port isolation and cleanup 
behavior needs direct validation. However, `HostPortForwarder` is shared E2E 
support code under `seatunnel-e2e-common/src/test/java`, and that module 
packages its test sources as a test JAR, so adding a standalone unit test there 
is not the right permanent test layer.
   
   I therefore kept the focused regression test local (not committed) and ran 
it in a clean Linux JDK 8 container. The temporary test covered all of the 
requested behavior:
   
   - started two independent target servers;
   - started two `HostPortForwarder` instances with the same dynamically 
selected published port;
   - verified that the two forwarders bound distinct `127/8` loopback addresses;
   - sent unique request bytes through each mapping and verified unique 
response bytes in the reverse direction;
   - closed both forwarders, then rebound both exact 
`loopbackAddress:publishedPort` pairs (with `SO_REUSEADDR` only on the probes 
to avoid `TIME_WAIT` false negatives).
   
   Focused command:
   
   ```bash
   ./mvnw -o -Dmaven.repo.local=/maven-home/repository \
     -pl seatunnel-e2e/seatunnel-e2e-common \
     -DskipUT=false -Dtest=HostPortForwarderTest test
   ```
   
   Result:
   
   ```text
   Running org.apache.seatunnel.e2e.common.util.HostPortForwarderTest
   Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
   BUILD SUCCESS
   ```
   
   The previously reported required Build was cancelled by a later branch 
update rather than by a test failure. The latest Build is running from the 
branch synchronized with current `dev`; no failure has appeared at the time of 
this comment.


-- 
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]

Reply via email to