

def current_offset(self, topic, partition):
    try:
        (offsets,) = self.client.send_offset_request([OffsetRequestPayload(topic, partition, (- 1), 1)])
    except:
        self.zk.child.dump_logs()
        self.server.child.dump_logs()
        raise
    else:
        return offsets.offsets[0]

dataset/ETHPy150Open dpkp/kafka-python/test/testutil.py KafkaIntegrationTestCase.current_offset/original