Skip to content

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

Open
merlimat wants to merge 1 commit intoapache:masterfrom
merlimat:fix/flaky-FunctionRuntimeManagerTest
Open

[fix][test] Fix flaky FunctionRuntimeManagerTest.testExternallyManagedRuntimeUpdate#25465
merlimat wants to merge 1 commit intoapache:masterfrom
merlimat:fix/flaky-FunctionRuntimeManagerTest

Conversation

@merlimat
Copy link
Copy Markdown
Contributor

@merlimat merlimat commented Apr 3, 2026

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

1 participant