kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject kafka git commit: HOTFIX: Remove failing ConnectDistributedTest.test_bad_connector_class
Date Tue, 15 Nov 2016 01:10:16 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 3b4c34794 -> a32962af1


HOTFIX: Remove failing ConnectDistributedTest.test_bad_connector_class

Since #1911 was merged it is hard to externally test a connector transitioning to FAILED state
due to an initialization failure, which is what this test was attempting to verify.

The unit test added in #1778 already exercises exception-handling around Connector instantiation.

Author: Shikhar Bhushan <shikhar@confluent.io>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes #2131 from shikhar/test_bad_connector_class


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

Branch: refs/heads/trunk
Commit: a32962af1427483eb103868497d3bfb6d5537fc6
Parents: 3b4c347
Author: Shikhar Bhushan <shikhar@confluent.io>
Authored: Mon Nov 14 17:07:39 2016 -0800
Committer: Jason Gustafson <jason@confluent.io>
Committed: Mon Nov 14 17:07:39 2016 -0800

----------------------------------------------------------------------
 .../tests/connect/connect_distributed_test.py   | 37 --------------------
 1 file changed, 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a32962af/tests/kafkatest/tests/connect/connect_distributed_test.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/tests/connect/connect_distributed_test.py b/tests/kafkatest/tests/connect/connect_distributed_test.py
index ca8ff68..ee0a222 100644
--- a/tests/kafkatest/tests/connect/connect_distributed_test.py
+++ b/tests/kafkatest/tests/connect/connect_distributed_test.py
@@ -155,43 +155,6 @@ class ConnectDistributedTest(Test):
         wait_until(lambda: self.connector_is_running(self.sink), timeout_sec=10,
                    err_msg="Failed to see connector transition to the RUNNING state")
 
-    @matrix(delete_before_reconfig=[False, True])
-    def test_bad_connector_class(self, delete_before_reconfig):
-        """
-        For the same connector name, first configure it with a bad connector class name such
that it fails to start, verify that it enters a FAILED state.
-        Restart should also fail.
-        Then try to rectify by reconfiguring it as a MockConnector and verifying it successfully
transitions to RUNNING.
-        """
-        self.setup_services()
-        self.cc.set_configs(lambda node: self.render("connect-distributed.properties", node=node))
-        self.cc.start()
-
-        connector_name = 'bad-to-good-test'
-
-        connector = namedtuple('BadConnector', ['name', 'tasks'])(connector_name, 1)
-        config = {
-            'name': connector.name,
-            'tasks.max': connector.tasks,
-            'connector.class': 'java.util.HashMap'
-        }
-        self.cc.create_connector(config)
-
-        wait_until(lambda: self.connector_is_failed(connector), timeout_sec=10, err_msg="Failed
to see connector transition to FAILED state")
-
-        try:
-            self.cc.restart_connector(connector_name)
-        except ConnectRestError:
-            pass
-        else:
-            raise AssertionError("Expected restart of %s to fail" % connector_name)
-
-        if delete_before_reconfig:
-            self.cc.delete_connector(connector_name)
-
-        config['connector.class'] = 'org.apache.kafka.connect.tools.MockSourceConnector'
-        self.cc.set_connector_config(connector_name, config)
-        wait_until(lambda: self.connector_is_running(connector), timeout_sec=10, err_msg="Failed
to see connector transition to the RUNNING state")
-
     @matrix(connector_type=["source", "sink"])
     def test_restart_failed_task(self, connector_type):
         self.setup_services()


Mime
View raw message