You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by mj...@apache.org on 2020/07/27 23:11:19 UTC

[kafka] branch 2.5 updated: MINOR: Remove staticmethod tag to be able to use logger of instance (#9086)

This is an automated email from the ASF dual-hosted git repository.

mjsax pushed a commit to branch 2.5
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.5 by this push:
     new 2de640c  MINOR: Remove staticmethod tag to be able to use logger of instance (#9086)
2de640c is described below

commit 2de640c7c6cc30791b0329c1ea480f181cff12ef
Author: Bruno Cadonna <br...@confluent.io>
AuthorDate: Mon Jul 27 18:38:14 2020 +0200

    MINOR: Remove staticmethod tag to be able to use logger of instance (#9086)
    
    A system test failed with the following error: global name 'self' is not defined
    
    The reason was that `self` was accessed to log a message in a static method. This commit makes the method an instance method.
    
    Reviewer: Matthias J. Sax <ma...@confluent.io>
---
 tests/kafkatest/tests/streams/base_streams_test.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/kafkatest/tests/streams/base_streams_test.py b/tests/kafkatest/tests/streams/base_streams_test.py
index 256693c..2cfe27b 100644
--- a/tests/kafkatest/tests/streams/base_streams_test.py
+++ b/tests/kafkatest/tests/streams/base_streams_test.py
@@ -95,8 +95,7 @@ class BaseStreamsTest(KafkaTest):
                    timeout_sec=60,
                    err_msg="Did expect to read '%s' from %s" % (message, processor.node.account))
 
-    @staticmethod
-    def verify_from_file(processor, message, file):
+    def verify_from_file(self, processor, message, file):
         result = processor.node.account.ssh_output("grep -E '%s' %s | wc -l" % (message, file), allow_fail=False)
         try:
           return int(result)