chovy-3012 commented on PR #13309:
URL: https://github.com/apache/seatunnel/pull/13309#issuecomment-7003928471

   Thanks @DanielLeens for the detailed review and especially for the precise 
CI diagnosis — the unclosed `mockStatic(RestService.class)` was exactly the 
failure source. All items are addressed in `c10ec414d7`.
   
   **Issue 1 — source-level integration regression (blocking)**
   Added `DorisIT.testSourceFailsFastWhenFeUnreachable` + 
`doris_source_fe_unreachable.conf`. The catalog JDBC path still reaches the 
real Doris through the query port (9030), while FE HTTP port 9999 is turned 
into a silent SYN black hole by running the host's `iptables` inside the 
container's network namespace (`sudo nsenter -t <doris-pid> -n iptables -A 
INPUT -p tcp --dport 9999 -j DROP`) — the Doris image ships no iptables binary, 
and INPUT is the one chain every incoming packet must traverse, so nothing 
needs to be installed inside the container. The job then fails with `Doris-03` 
+ `connect timed out` under a 60 s deadline instead of hanging; without the fix 
it waits out the kernel SYN retries and trips the deadline. Verified by 
`connector-doris-e2e` test-compile plus a live check of the black-hole behavior 
on a real Doris container (connection refused before the DROP rule, connect 
timeout after it). The IT itself runs in the `doris-connector-it` CI leg, same 
as the other Dori
 s ITs.
   
   **Issue 2 — timing assertion and executor cleanup (non-blocking)**
   `RestServiceTest` now measures with `System.nanoTime()` and only asserts the 
request failed before the stub server's 10 s delayed response (the tight 
3×timeout wall-clock budget is gone), keeps the exact `SocketTimeoutException` 
cause assertion plus `@Timeout(30)`, and shuts down the stub server's 
`ExecutorService` in `tearDown` (shutdown → awaitTermination → shutdownNow).
   
   **CI root cause — mockStatic leak (per your diagnosis)**
   `DorisSourceSplitEnumeratorTest.dorisSourceSplitEnumeratorTest` now scopes 
`Mockito.mockStatic(RestService.class)` with try-with-resources, so the static 
mock can no longer leak into later tests on the same thread. The full suite was 
run as a whole rather than RestServiceTest alone: 162/162 in the default order 
and again with `-Dsurefire.runOrder=alphabetical` (the ordering that exposed 
the leak), spotless clean.
   
   ```
   ./mvnw -pl :connector-doris test
   ./mvnw -pl :connector-doris test -Dsurefire.runOrder=alphabetical
   ./mvnw -pl :connector-doris-e2e test-compile
   ```
   


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