Browse Source

MINOR: Fix undefined variable in Connect test

Corrects an error in the system tests:
```
07:55:45 [ERROR:2018-10-23 07:55:45,738]: Failed to import kafkatest.tests.connect.connect_test, which may indicate a broken test that cannot be loaded: NameError: name 'EXTERNAL_CONFIGS_FILE' is not defined
```

The constant is defined in the [services/connect.py](https://github.com/apache/kafka/blob/trunk/tests/kafkatest/services/connect.py#L43) file in the `ConnectServiceBase` class, but the problem is in the [tests/connect/connect_test.py](https://github.com/apache/kafka/blob/trunk/tests/kafkatest/tests/connect/connect_test.py#L50) `ConnectStandaloneFileTest`, which does *not* extend the `ConnectServiceBase class`. Suggestions welcome to be able to reuse that variable without duplicating the literal (as in this PR).

System test run with this PR: https://jenkins.confluent.io/job/system-test-kafka-branch-builder/2004/

If approved, this should be merged as far back as the `2.0` branch.

Author: Randall Hauch <rhauch@gmail.com>

Reviewers: Ewen Cheslack-Postava <ewen@confluent.io>

Closes #5832 from rhauch/fix-connect-externals-tests
pull/5781/head
Randall Hauch 6 years ago committed by Ewen Cheslack-Postava
parent
commit
8b1d705404
  1. 2
      tests/kafkatest/tests/connect/connect_test.py

2
tests/kafkatest/tests/connect/connect_test.py

@ -47,7 +47,7 @@ class ConnectStandaloneFileTest(Test): @@ -47,7 +47,7 @@ class ConnectStandaloneFileTest(Test):
OFFSETS_FILE = "/mnt/connect.offsets"
TOPIC = "${file:" + EXTERNAL_CONFIGS_FILE + ":topic.external}"
TOPIC = "${file:/mnt/connect/connect-file-external.properties:topic.external}"
TOPIC_TEST = "test"
FIRST_INPUT_LIST = ["foo", "bar", "baz"]

Loading…
Cancel
Save