diff --git a/pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/FunctionRuntimeManagerTest.java b/pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/FunctionRuntimeManagerTest.java index b96160fa1fae9..361dbad2593bd 100644 --- a/pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/FunctionRuntimeManagerTest.java +++ b/pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/FunctionRuntimeManagerTest.java @@ -742,6 +742,9 @@ public void testExternallyManagedRuntimeUpdate() throws Exception { .get("worker-2").get("test-tenant/test-namespace/func-1:0"), assignment2); assertNull(functionRuntimeManager.functionRuntimeInfos.get("test-tenant/test-namespace/func-1:0")); + // Clear invocations to ensure the next verify block starts fresh + Mockito.clearInvocations(functionActioner); + /** Test transfer from other worker to me **/ Assignment assignment3 = createAssignment("worker-1", function1, 0);