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

   ## Purpose of this pull request
   
   Yes, this is a contribution to Apache SeaTunnel.
   
   Two job-control E2E tests read job state after a fixed wait instead of 
waiting for the state itself:
   
   - `JobExecutionIT#cancelJobTest` sleeps `1000ms` hoping the streaming job 
reached `RUNNING` before `cancelJob()` — under CI load job startup can be 
slower, so the cancel is exercised against a not-yet-started job;
   - `SeaTunnelConnectorBatchCancelTest#task` sleeps `15000ms` hoping both 
batch jobs appear in the `seatunnel.sh -l` listing — under CI load the jobs can 
take longer to start, so the `assertEquals(2, runningJobId.size())` assertion 
fails intermittently.
   
   This PR replaces the fixed sleeps with bounded Awaitility polling for the 
actual precondition, keeping the scenarios and expected values unchanged:
   
   - `JobExecutionIT#cancelJobTest` polls until the job status is `RUNNING` 
before cancelling;
   - `SeaTunnelConnectorBatchCancelTest` polls the `-l` listing until both jobs 
are listed (the id extraction is extracted into a `listBatchCancelJobIds` 
helper used by both the poll and the rest of the test).
   
   Searched the open PRs for the same objective (JobExecutionIT / BatchCancel / 
fixed sleeps) and found no duplicate.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   - `./mvnw spotless:apply`
   - `./mvnw -DskipTests -Dcheckstyle.skip=true -Dlicense.skip=true 
-Dspotless.skip=true -pl 
seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base,seatunnel-e2e/seatunnel-core-e2e/seatunnel-starter-e2e
 test-compile`
   
   The ITs themselves run in the engine E2E / starter E2E CI jobs (no Docker 
available in the authoring environment); the change only alters how long the 
tests wait, not what they assert.
   


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