Skip to content

[fix][test] Fix flaky FunctionRuntimeManagerTest.testExternallyManagedRuntimeUpdate - #25465

Merged
nodece merged 1 commit into
apache:masterfrom
merlimat:fix/flaky-FunctionRuntimeManagerTest
Apr 7, 2026
Merged

nodece merged 1 commit into
apache:masterfrom
merlimat:fix/flaky-FunctionRuntimeManagerTest

Conversation

@merlimat

@merlimat merlimat commented Apr 3, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

FunctionRuntimeManagerTest.testExternallyManagedRuntimeUpdate is flaky because accumulated Mockito spy invocations from the first test section leak into the second verification block.

Stack trace

FunctionRuntimeManagerTest > testExternallyManagedRuntimeUpdate FAILED
    org.mockito.exceptions.verification.NeverWantedButInvoked
        at FunctionRuntimeManagerTest.java:720

Modifications

Add Mockito.clearInvocations(functionActioner) between the two verification blocks ("transfer from me to other worker" and "transfer from other worker to me") so that verify(times(0)) assertions in the second block are not affected by invocations from the first block.

Documentation

  • doc-not-needed

…dRuntimeUpdate

Add clearInvocations between the two verification blocks in the test
to prevent accumulated Mockito spy invocations from interfering with
the second verify block's times(0) assertions.
@github-actions github-actions Bot added doc-label-missing doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Apr 3, 2026
@apache apache deleted a comment from github-actions Bot Apr 3, 2026
@nodece
nodece merged commit 05a703b into apache:master Apr 7, 2026
82 of 86 checks passed
@lhotari lhotari added this to the 5.0.0-M1 milestone Jun 12, 2026
@merlimat
merlimat deleted the fix/flaky-FunctionRuntimeManagerTest branch October 24, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants