ivandasch commented on a change in pull request #9196: URL: https://github.com/apache/kafka/pull/9196#discussion_r475195007
########## File path: tests/kafkatest/tests/connect/connect_distributed_test.py ########## @@ -440,11 +441,11 @@ def test_bounce(self, clean, connect_protocol): sink_seqnos = [msg['seqno'] for msg in sink_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. - sink_seqno_max = max(sink_seqnos) + sink_seqno_max = max(sink_seqnos) if len(sink_seqnos) else 0 self.logger.debug("Max sink seqno: %d", sink_seqno_max) sink_seqno_counts = Counter(sink_seqnos) missing_sink_seqnos = sorted(set(range(sink_seqno_max)).difference(set(sink_seqnos))) - duplicate_sink_seqnos = sorted([seqno for seqno,count in sink_seqno_counts.iteritems() if count > 1]) + duplicate_sink_seqnos = sorted([seqno for seqno,count in iter(sink_seqno_counts.items()) if count > 1]) Review comment: Rewrite please it like this: `sorted(seqno for seqno,count in sink_seqno_counts.items() if count > 1)` ---------------------------------------------------------------- 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