ocb3916 opened a new pull request, #28481:
URL: https://github.com/apache/flink/pull/28481

   ## What is the purpose of the change
   
   This PR improves test reliability by converting flaky or 
race-condition-prone test cases to use `@RepeatedTest` instead of `@Test`. The 
goal is to verify that these tests consistently pass across multiple 
executions, catching intermittent failures that a single run might miss.
   
   - `testVertexInitializationFailureIsLabeled` in `AdaptiveBatchSchedulerTest` 
is run **10,000 times** to confirm stable behavior under repeated scheduling 
conditions.
   - `testUnbalancedInput` in `ExecutionTimeBasedSlowTaskDetectorTest` is run 
**1,000 times** to validate deterministic slow-task detection logic against 
unbalanced input distributions.
   
   Additionally, a helper method `testUserConfiguredMaxParallelism(...)` is 
changed to `private` to clarify its intended scope and prevent accidental test 
framework invocation.
   
   ---
   
   ## Brief change log
   
   - **`AdaptiveBatchSchedulerTest.java`**
     - Added import: `org.junit.jupiter.api.RepeatedTest`
     - Changed `@Test` → `@RepeatedTest(10000)` on 
`testVertexInitializationFailureIsLabeled`
     - Changed `testUserConfiguredMaxParallelism(...)` visibility from 
package-private → `private`
   
   - **`ExecutionTimeBasedSlowTaskDetectorTest.java`**
     - Added import: `org.junit.jupiter.api.RepeatedTest`
     - Changed `@Test` → `@RepeatedTest(1000)` on `testUnbalancedInput`
   
   - **`.idea/vcs.xml`**
     - Minor IDE configuration cleanup (VCS root entry update)
   
   ---
   
   ## Verifying this change
   
   Run the following test cases and confirm all repetitions pass without 
failure:
   
   ```bash
   # AdaptiveBatchSchedulerTest
   ./mvnw test -pl flink-runtime \
     -Dtest=AdaptiveBatchSchedulerTest#testVertexInitializationFailureIsLabeled 
\
     -Denforcer.skip=true
   
   # ExecutionTimeBasedSlowTaskDetectorTest
   ./mvnw test -pl flink-runtime \
     -Dtest=ExecutionTimeBasedSlowTaskDetectorTest#testUnbalancedInput \
     -Denforcer.skip=true
   ```
   
   Expected result: all 10,000 repetitions of 
`testVertexInitializationFailureIsLabeled` and all 1,000 repetitions of 
`testUnbalancedInput` complete successfully.
   
   ---
   
   ## Does this pull request potentially affect one of the following parts?
   
   - [ ] Dependencies (flink-dist or flink-parent pom)
   - [ ] The public API, i.e. changes to interfaces or classes that are 
`@Public` / `@PublicEvolving`
   - [ ] Core scheduling or execution logic
   - [ ] **Documentation** — No documentation changes are required. This PR 
only modifies test code and IDE configuration files. No user-facing behavior is 
altered.
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change the checkbox below to `[X]` followed by the name of the tool, and 
uncomment the
   "Generated-by" line. See the ASF Generative Tooling Guidance for details:
   https://www.apache.org/legal/generative-tooling.html
   
   You are responsible for the quality and correctness of every change in this 
PR
   regardless of the tooling used. Low-effort AI-generated PRs will be closed. 
See
   AGENTS.md for the full guidance.
   -->
   
   - [ ] Yes (please specify the tool below)
   
   <!--
   Generated-by: [Tool Name and Version]
   -->
   


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