kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch 0.10.2 updated: MINOR: Flaky test improvement (#5761)
Date Tue, 09 Oct 2018 22:18:33 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/0.10.2 by this push:
     new 8adaf91  MINOR: Flaky test improvement (#5761)
8adaf91 is described below

commit 8adaf91cfadd736857fd6f8d842f30efd995e2a4
Author: John Roesler <vvcephei@users.noreply.github.com>
AuthorDate: Tue Oct 9 17:18:23 2018 -0500

    MINOR: Flaky test improvement (#5761)
    
    Reviewers: Bill Bejeck <bill@confluent.io>, Guozhang Wang <guozhang@confluent.io>
---
 tests/kafkatest/tests/streams/streams_broker_compatibility_test.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py b/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
index d6e6c9a..41e0dbe 100644
--- a/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
+++ b/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
@@ -15,7 +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
 from kafkatest.services.verifiable_consumer import VerifiableConsumer
@@ -66,14 +66,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