qiuyanjun888 opened a new pull request, #28535: URL: https://github.com/apache/flink/pull/28535
## What is the purpose of the change This pull request fixes the flaky `DeclarativeSlotPoolBridgeTest.testAcceptingOfferedSlotsWithoutResourceManagerConnected` reported in FLINK-39962. The Jira describes a test-only threading race: the test used the regular `forMainThread()` test executor, whose scheduled timeout callbacks can run concurrently with the test thread while `close()` copies `pendingRequests`, intermittently producing `NegativeArraySizeException`. ## Brief change log - Use a `ManuallyTriggeredScheduledExecutorService` for the affected test. - Manually complete the deferred slot-request declaration task when `slotRequestMaxInterval` is positive. - Keep production slot-pool code unchanged and avoid triggering unrelated request/idle/batch timeout tasks in this test. ## Verifying this change This change is covered by the existing affected test and the containing test class: - `./mvnw -pl flink-runtime -Dtest=DeclarativeSlotPoolBridgeTest#testAcceptingOfferedSlotsWithoutResourceManagerConnected -DfailIfNoTests=false -DskipITs -Dfast -Drat.skip=true -Dcheckstyle.skip=true -Dspotless.check.skip=true test` - `./mvnw -pl flink-runtime -Dtest=DeclarativeSlotPoolBridgeTest -DfailIfNoTests=false -DskipITs -Dfast -Drat.skip=true -Dcheckstyle.skip=true -Dspotless.check.skip=true test` - `./mvnw -pl flink-runtime -DskipTests -DskipITs -Drat.skip=true spotless:check` - `./mvnw -pl flink-runtime -DskipTests -DskipITs -Drat.skip=true checkstyle:check` ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no - The serializers: no - The runtime per-record code paths (performance sensitive): no - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Hermes Agent (OpenAI GPT-5.5) -- 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]
