This is an automated email from the ASF dual-hosted git repository.
zixuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 3bbe99c5017 [fix][test] Fix flaky
MembershipManagerTest.testCheckFailuresSomeFailures (#25466)
3bbe99c5017 is described below
commit 3bbe99c50173612ff9e9343708165fb11799fd7c
Author: Matteo Merli <[email protected]>
AuthorDate: Mon Apr 6 20:33:52 2026 -0700
[fix][test] Fix flaky MembershipManagerTest.testCheckFailuresSomeFailures
(#25466)
---
.../org/apache/pulsar/functions/worker/MembershipManagerTest.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/MembershipManagerTest.java
b/pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/MembershipManagerTest.java
index 07af4a5654f..a51945f0eca 100644
---
a/pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/MembershipManagerTest.java
+++
b/pulsar-functions/worker/src/test/java/org/apache/pulsar/functions/worker/MembershipManagerTest.java
@@ -236,6 +236,9 @@ public class MembershipManagerTest {
functionRuntimeManager.setAssignment(assignment1);
functionRuntimeManager.setAssignment(assignment2);
+ // Clear any invocations from setup
+ Mockito.clearInvocations(functionRuntimeManager, schedulerManager);
+
membershipManager.checkFailures(functionMetaDataManager,
functionRuntimeManager, schedulerManager);
verify(schedulerManager, times(0)).schedule();
@@ -245,6 +248,9 @@ public class MembershipManagerTest {
String instanceId =
FunctionCommon.getFullyQualifiedInstanceId(instance);
assertNotNull(membershipManager.unsignedFunctionDurations.get(instanceId));
+ // Clear invocations before second checkFailures
+ Mockito.clearInvocations(functionRuntimeManager, schedulerManager);
+
membershipManager.unsignedFunctionDurations.put(instanceId,
membershipManager.unsignedFunctionDurations.get(instanceId) -
30001);