apalan60 commented on code in PR #20772:
URL: https://github.com/apache/kafka/pull/20772#discussion_r2478206028
##########
tests/kafkatest/tests/client/consumer_test.py:
##########
@@ -74,6 +75,37 @@ def setup_consumer(self, topic, **kwargs):
self.mark_for_collect(consumer, 'verifiable_consumer_stdout')
return consumer
+ def await_conflict_consumers_fenced(self, conflict_consumer):
+ # Ensure every conflicting consumer actually starts once before we
wait for fencing.
+ started_nodes = set()
+ def all_conflict_consumers_started():
+ for node in conflict_consumer.alive_nodes():
+ started_nodes.add(node)
+ return len(conflict_consumer.alive_nodes()) ==
len(conflict_consumer.nodes)
+
+ wait_until(all_conflict_consumers_started,
+ timeout_sec=60,
+ err_msg="Timed out waiting for conflict consumers to start
before fencing")
+
+ wait_until(lambda: len(conflict_consumer.dead_nodes()) ==
len(conflict_consumer.nodes),
+ timeout_sec=60,
+ err_msg="Timed out waiting for conflict consumers to
terminate after fencing")
+
+ # Guard against stray processes that could rejoin once the original
static members stop.
Review Comment:
Done.
I’ve included this explanation here:
https://github.com/apache/kafka/pull/20772/files#diff-d3acc8af63cbc0e087de2edb74ce53c6e4191c87f27e9a29359faef033eb0911R339-R341
--
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]