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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new f4a39f9  MINOR: Fix flaky standby task test (#4767)
f4a39f9 is described below

commit f4a39f9b8314847ffc7250f8cee3e87795b0aaeb
Author: Bill Bejeck <[email protected]>
AuthorDate: Mon Mar 26 19:22:20 2018 -0400

    MINOR: Fix flaky standby task test (#4767)
    
    The standby-task test failed due to standby task distribution not be 
exactly equal. I think this will be the case from time to time, so I've updated 
test to make sure the standby task assignment count is not zero.
    
    Reviewers: Guozhang Wang <[email protected]>, John Roesler 
<[email protected]>, Matthias J. Sax <[email protected]>
---
 tests/kafkatest/tests/streams/base_streams_test.py            | 2 +-
 tests/kafkatest/tests/streams/streams_standby_replica_test.py | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/kafkatest/tests/streams/base_streams_test.py 
b/tests/kafkatest/tests/streams/base_streams_test.py
index 6502773..70da44e 100644
--- a/tests/kafkatest/tests/streams/base_streams_test.py
+++ b/tests/kafkatest/tests/streams/base_streams_test.py
@@ -94,6 +94,6 @@ class BaseStreamsTest(KafkaTest):
 
     @staticmethod
     def verify_from_file(processor, message, file):
-        result = processor.node.account.ssh_output("grep '%s' %s | wc -l" % 
(message, file), allow_fail=False)
+        result = processor.node.account.ssh_output("grep -E '%s' %s | wc -l" % 
(message, file), allow_fail=False)
         return int(result)
 
diff --git a/tests/kafkatest/tests/streams/streams_standby_replica_test.py 
b/tests/kafkatest/tests/streams/streams_standby_replica_test.py
index b77326f..e901cb3 100644
--- a/tests/kafkatest/tests/streams/streams_standby_replica_test.py
+++ b/tests/kafkatest/tests/streams/streams_standby_replica_test.py
@@ -100,6 +100,10 @@ class StreamsStandbyTask(BaseStreamsTest):
         self.wait_for_verification(processor_2, "ACTIVE_TASKS:6 
STANDBY_TASKS:0", processor_2.STDOUT_FILE)
 
         processor_3.start()
+
+        self.wait_for_verification(processor_3, "ACTIVE_TASKS:3 
STANDBY_TASKS:3", processor_3.STDOUT_FILE)
+        self.wait_for_verification(processor_2, "ACTIVE_TASKS:3 
STANDBY_TASKS:3", processor_2.STDOUT_FILE, num_lines=2)
+
         processor_1.start()
 
         self.wait_for_verification(processor_1, "ACTIVE_TASKS:2 
STANDBY_TASKS:2", processor_1.STDOUT_FILE)

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to