SiriusTL666 commented on PR #13009:
URL: https://github.com/apache/seatunnel/pull/13009#issuecomment-6555719779

   Added the integration/handshake coverage from the review.
   
   **Refused-login branch.** The test stubbed `greetingCode = 530`, which 
`connect()` rejects before `login()` runs, so it re-tested the greeting branch 
and never reached `loginAccepted == false`. The greeting is now positive, 
`login()` returns `false`, and the test asserts `connect()`, `login()` and 
`disconnect()` ran with no `logout()`.
   
   **Real socket.** A `ServerSocket` that accepts the connection and never 
writes the 220 greeting now drives the production `connect()` with 
`control_timeout = 1000`. The test requires the `SocketTimeoutException` to 
arrive promptly and the server to observe the connection close, so the bound is 
proven on the socket rather than inferred from the value handed to the client. 
A companion test keeps `control_timeout = 0` and asserts the call is still 
blocked after 1.5 s, so the opt-out is covered by behaviour.
   
   I verified the underlying behaviour outside the suite against commons-net 
3.6: a silent server with `setDefaultTimeout(1000)` fails at 1012 ms with the 
peer observing the close, while `0` is still blocked after 8 s.
   
   Branch head `f41359fd0`, `spotless:check` passes. The new socket tests bind 
to the loopback interface only, use no fixed port and no sleep-dependent 
assertion beyond a generous upper bound, so they should stay stable on CI. TCP 
connect and data-transfer deadlines are untouched, as requested.


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