nizhikov commented on a change in pull request #9196:
URL: https://github.com/apache/kafka/pull/9196#discussion_r475192532



##########
File path: tests/kafkatest/tests/connect/connect_distributed_test.py
##########
@@ -420,11 +421,14 @@ def test_bounce(self, clean, connect_protocol):
             src_seqnos = [msg['seqno'] for msg in src_messages if msg['task'] 
== task]
             # Every seqno up to the largest one we ever saw should appear. 
Each seqno should only appear once because clean
             # bouncing should commit on rebalance.
-            src_seqno_max = max(src_seqnos)
+            if len(src_seqnos) == 0:
+                src_seqno_max = 0
+            else:
+                src_seqno_max = max(src_seqnos)
             self.logger.debug("Max source seqno: %d", src_seqno_max)
             src_seqno_counts = Counter(src_seqnos)
             missing_src_seqnos = 
sorted(set(range(src_seqno_max)).difference(set(src_seqnos)))
-            duplicate_src_seqnos = sorted([seqno for seqno,count in 
src_seqno_counts.iteritems() if count > 1])
+            duplicate_src_seqnos = sorted([seqno for seqno,count in 
iter(src_seqno_counts.items()) if count > 1])

Review comment:
       fixed.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to