kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: HOTFIX: renamed test so it is picked up by ducktape
Date Wed, 08 Feb 2017 20:50:15 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.2 bec105d48 -> b75d37a2a


HOTFIX: renamed test so it is picked up by ducktape

Author: Eno Thereska <eno@confluent.io>

Reviewers: Matthias J. Sax, Guozhang Wang

Closes #2517 from enothereska/hotfix-broker-test

(cherry picked from commit e7c869e65d25dcf2d0a8f949da31c15d1d843950)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


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

Branch: refs/heads/0.10.2
Commit: b75d37a2a97a6c75ceeb06914128fa7bc9176fe4
Parents: bec105d
Author: Eno Thereska <eno@confluent.io>
Authored: Wed Feb 8 12:50:04 2017 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Wed Feb 8 12:50:12 2017 -0800

----------------------------------------------------------------------
 .../streams/streams_broker_compatibility.py     | 90 --------------------
 .../streams_broker_compatibility_test.py        | 90 ++++++++++++++++++++
 2 files changed, 90 insertions(+), 90 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/b75d37a2/tests/kafkatest/tests/streams/streams_broker_compatibility.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/tests/streams/streams_broker_compatibility.py b/tests/kafkatest/tests/streams/streams_broker_compatibility.py
deleted file mode 100644
index 4a035a4..0000000
--- a/tests/kafkatest/tests/streams/streams_broker_compatibility.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from ducktape.mark import parametrize
-from ducktape.tests.test import Test
-
-from kafkatest.services.kafka import KafkaService
-from kafkatest.services.streams import StreamsBrokerCompatibilityService
-from kafkatest.services.verifiable_consumer import VerifiableConsumer
-from kafkatest.services.zookeeper import ZookeeperService
-from kafkatest.version import DEV_BRANCH, LATEST_0_10_1, LATEST_0_10_0, KafkaVersion
-
-
-class StreamsBrokerCompatibility(Test):
-    """
-    These tests validate that Streams v0.10.2+ can connect to older brokers v0.10+
-    and that Streams fails fast for pre-0.10 brokers
-    """
-
-    input = "brokerCompatibilitySourceTopic"
-    output = "brokerCompatibilitySinkTopic"
-
-    def __init__(self, test_context):
-        super(StreamsBrokerCompatibility, self).__init__(test_context=test_context)
-
-        self.zk = ZookeeperService(test_context, num_nodes=1)
-        self.kafka = KafkaService(test_context,
-                                  num_nodes=1,
-                                  zk=self.zk,
-                                  topics={
-                                      self.input: {'partitions': 1, 'replication-factor':
1},
-                                      self.output: {'partitions': 1, 'replication-factor':
1}
-                                  })
-
-        self.processor = StreamsBrokerCompatibilityService(self.test_context, self.kafka)
-
-        self.consumer = VerifiableConsumer(test_context,
-                                           1,
-                                           self.kafka,
-                                           self.output,
-                                           "stream-broker-compatibility-verify-consumer")
-
-    def setUp(self):
-        self.zk.start()
-
-    @parametrize(broker_version=str(DEV_BRANCH))
-    @parametrize(broker_version=str(LATEST_0_10_1))
-    def test_compatible_brokers(self, broker_version):
-        self.kafka.set_version(KafkaVersion(broker_version))
-        self.kafka.start()
-
-        self.processor.start()
-        self.consumer.start()
-
-        self.processor.wait()
-
-        num_consumed_mgs = self.consumer.total_consumed()
-
-        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))
-        self.kafka.start()
-
-        self.processor.start()
-
-        self.processor.node.account.ssh(self.processor.start_cmd(self.processor.node))
-        with self.processor.node.account.monitor_log(self.processor.STDERR_FILE) as monitor:
-            monitor.wait_until('Exception in thread "main" org.apache.kafka.streams.errors.StreamsException:
Kafka Streams requires broker version 0.10.1.x or higher.',
-                        timeout_sec=60,
-                        err_msg="Never saw 'incompatible broker' error message " + str(self.processor.node.account))
-
-        self.kafka.stop()

http://git-wip-us.apache.org/repos/asf/kafka/blob/b75d37a2/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
new file mode 100644
index 0000000..d6e6c9a
--- /dev/null
+++ b/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
@@ -0,0 +1,90 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from ducktape.mark import parametrize
+from ducktape.tests.test import Test
+
+from kafkatest.services.kafka import KafkaService
+from kafkatest.services.streams import StreamsBrokerCompatibilityService
+from kafkatest.services.verifiable_consumer import VerifiableConsumer
+from kafkatest.services.zookeeper import ZookeeperService
+from kafkatest.version import DEV_BRANCH, LATEST_0_10_1, LATEST_0_10_0, KafkaVersion
+
+
+class StreamsBrokerCompatibility(Test):
+    """
+    These tests validate that Streams v0.10.2+ can connect to older brokers v0.10.1+
+    and that Streams fails fast for pre-0.10.0 brokers
+    """
+
+    input = "brokerCompatibilitySourceTopic"
+    output = "brokerCompatibilitySinkTopic"
+
+    def __init__(self, test_context):
+        super(StreamsBrokerCompatibility, self).__init__(test_context=test_context)
+
+        self.zk = ZookeeperService(test_context, num_nodes=1)
+        self.kafka = KafkaService(test_context,
+                                  num_nodes=1,
+                                  zk=self.zk,
+                                  topics={
+                                      self.input: {'partitions': 1, 'replication-factor':
1},
+                                      self.output: {'partitions': 1, 'replication-factor':
1}
+                                  })
+
+        self.processor = StreamsBrokerCompatibilityService(self.test_context, self.kafka)
+
+        self.consumer = VerifiableConsumer(test_context,
+                                           1,
+                                           self.kafka,
+                                           self.output,
+                                           "stream-broker-compatibility-verify-consumer")
+
+    def setUp(self):
+        self.zk.start()
+
+    @parametrize(broker_version=str(DEV_BRANCH))
+    @parametrize(broker_version=str(LATEST_0_10_1))
+    def test_compatible_brokers(self, broker_version):
+        self.kafka.set_version(KafkaVersion(broker_version))
+        self.kafka.start()
+
+        self.processor.start()
+        self.consumer.start()
+
+        self.processor.wait()
+
+        num_consumed_mgs = self.consumer.total_consumed()
+
+        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))
+        self.kafka.start()
+
+        self.processor.start()
+
+        self.processor.node.account.ssh(self.processor.start_cmd(self.processor.node))
+        with self.processor.node.account.monitor_log(self.processor.STDERR_FILE) as monitor:
+            monitor.wait_until('Exception in thread "main" org.apache.kafka.streams.errors.StreamsException:
Kafka Streams requires broker version 0.10.1.x or higher.',
+                        timeout_sec=60,
+                        err_msg="Never saw 'incompatible broker' error message " + str(self.processor.node.account))
+
+        self.kafka.stop()


Mime
View raw message