[FLINK-39962] [runtime] Fix flaky DeclarativeSlotPoolBridgeTest#28535
Open
qiuyanjun888 wants to merge 1 commit into
Open
[FLINK-39962] [runtime] Fix flaky DeclarativeSlotPoolBridgeTest#28535qiuyanjun888 wants to merge 1 commit into
qiuyanjun888 wants to merge 1 commit into
Conversation
Collaborator
spuru9
reviewed
Jun 25, 2026
spuru9
left a comment
Contributor
There was a problem hiding this comment.
LGTM.
Can you work on making build green.
Author
|
@flinkbot run azure |
Author
|
This PR is focused on runtime / slotpool flaky test. @RocMarshal @1996fanrui could you please take a look when you have time and advise whether this approach is acceptable for this area and can move forward? |
davidradl
reviewed
Jun 26, 2026
|
|
||
| @TestTemplate | ||
| void testAcceptingOfferedSlotsWithoutResourceManagerConnected() throws Exception { | ||
| final ManuallyTriggeredScheduledExecutorService scheduledExecutor = |
Contributor
There was a problem hiding this comment.
I am curious can this race occur in the main code ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This pull request fixes the flaky
DeclarativeSlotPoolBridgeTest.testAcceptingOfferedSlotsWithoutResourceManagerConnectedreported 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 whileclose()copiespendingRequests, intermittently producingNegativeArraySizeException.Brief change log
ManuallyTriggeredScheduledExecutorServicefor the affected test.slotRequestMaxIntervalis positive.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:checkDoes this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Hermes Agent (OpenAI GPT-5.5)