kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: improve test stability for Streams broker-compatibility test
Date Thu, 20 Apr 2017 20:49:10 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 98d62a880 -> 779874fb1


MINOR: improve test stability for Streams broker-compatibility test

Author: Matthias J. Sax <matthias@confluent.io>

Reviewers: Magnus Edenhill, Eno Thereska, Damian Guy, Guozhang Wang

Closes #2836 from mjsax/minor-broker-comp-test


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/779874fb
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/779874fb
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/779874fb

Branch: refs/heads/trunk
Commit: 779874fb14f5a2f60016546059576e8ae936b14c
Parents: 98d62a8
Author: Matthias J. Sax <matthias@confluent.io>
Authored: Thu Apr 20 13:49:06 2017 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Thu Apr 20 13:49:06 2017 -0700

----------------------------------------------------------------------
 .../tests/streams/streams_broker_compatibility_test.py         | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/779874fb/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py b/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
index d6e6c9a..56fc7dc 100644
--- a/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
+++ b/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
@@ -15,6 +15,7 @@
 
 from ducktape.mark import parametrize
 from ducktape.tests.test import Test
+from ducktape.utils.util import wait_until
 
 from kafkatest.services.kafka import KafkaService
 from kafkatest.services.streams import StreamsBrokerCompatibilityService
@@ -66,14 +67,11 @@ class StreamsBrokerCompatibility(Test):
 
         self.processor.wait()
 
-        num_consumed_mgs = self.consumer.total_consumed()
+        wait_until(lambda: self.consumer.total_consumed() > 0, timeout_sec=30, err_msg="Did
expect to read a message but got none within 30 seconds.")
 
         self.consumer.stop()
         self.kafka.stop()
 
-        assert num_consumed_mgs == 1, \
-            "Did expect to read exactly one message but got %d" % num_consumed_mgs
-
     @parametrize(broker_version=str(LATEST_0_10_0))
     def test_fail_fast_on_incompatible_brokers(self, broker_version):
         self.kafka.set_version(KafkaVersion(broker_version))


Mime
View raw message