davsclaus commented on code in PR #30657:
URL: https://github.com/apache/camel/pull/30657#discussion_r4665654899


##########
components/camel-kubernetes/src/test/java/org/apache/camel/component/kubernetes/cluster/KubernetesClusterViewStopTest.java:
##########
@@ -214,7 +216,8 @@ void 
testStopOfManyGroupsDoesNotWaitWhenTheLastLookupFailed(LeaseResourceType ty
         service.stop();
         long millis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);
 
-        assertTrue(millis < RENEW_DEADLINE_MILLIS / 2, "The stop of " + 
GROUPS.size() + " groups took " + millis + " ms");
+        // a release that is tried waits until the renew deadline, so the stop 
would take at least that long
+        assertTrue(millis < RENEW_DEADLINE_MILLIS, "The stop of " + 
GROUPS.size() + " groups took " + millis + " ms");

Review Comment:
   `RENEW_DEADLINE_MILLIS` is the right bound here. A release that is tried 
waits for the rest of the renew deadline that the views share 
(`KubernetesClusterView.java:167-174`, 
`KubernetesLeadershipController.java:189-205`), so a stop that tries a release 
takes at least 1000 ms and still fails `< RENEW_DEADLINE_MILLIS`. With `2 * 
RENEW_DEADLINE_MILLIS` that regression (about 1000 ms plus the client closes) 
would pass. Resolving.
   
   _Claude Code on behalf of davsclaus_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to