nzw921rx opened a new pull request, #11842:
URL: https://github.com/apache/seatunnel/pull/11842

   ## Purpose
   
   SeaTunnel E2E tests contain many fixed `Thread.sleep` calls used to wait for 
asynchronous state changes. A fixed delay has two drawbacks in CI:
   
   - A fast runner always pays the complete delay even when the expected state 
is already ready.
   - A slow or heavily loaded runner can exceed the assumed delay and fail 
intermittently.
   
   As CI concurrency and connector coverage grow, these timing assumptions make 
the E2E suite slower and increasingly vulnerable to flaky failures.
   
   ## Changes
   
   - Replace fixed sleeps with condition-based Awaitility checks for observable 
states, including:
     - container and external service readiness;
     - job lifecycle, checkpoint, metrics, and cluster state;
     - CDC result propagation and schema evolution;
     - file creation, modification, cleanup, and connector output;
     - retry completion and eventual assertions.
   - Use bounded but sufficiently generous timeouts so loaded CI runners can 
converge without relying on exact timing.
   - Use stability windows when a value must remain unchanged for a period, 
instead of sleeping and checking only once.
   - Keep sleeps only where elapsed time is part of the test semantics, such as 
timestamp granularity, retry backoff, source pacing, and deliberate fault or 
latency injection.
   - Add an explicit comment to every retained sleep explaining why it is 
required.
   
   ## Expected impact
   
   - Tests finish as soon as their expected condition is satisfied.
   - Slow runners wait up to a clear deadline instead of failing after an 
arbitrary fixed delay.
   - Timeout failures identify the unmet condition directly, improving 
diagnosis.
   - E2E execution becomes faster and less flaky without changing the original 
assertion intent.
   
   ## Validation
   
   - `./mvnw spotless:apply`
   - Targeted `test-compile` for the affected E2E common, engine, CDC, 
connector, edge-socket, and local-file modules
   - `git diff --check`
   


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