Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

speed up kafka output tests #704

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/unit/connector/test_confluent_kafka_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TestConfluentKafkaOutput(BaseOutputTestCase, CommonConfluentKafkaTestCase)
"topic": "test_input_raw",
"flush_timeout": 0.1,
"kafka_config": {
"bootstrap.servers": "testserver:9092",
"bootstrap.servers": "localhost:9092",
},
}

Expand Down Expand Up @@ -109,7 +109,7 @@ def test_store_counts_processed_events(self, _): # pylint: disable=arguments-di
assert self.object.metrics.number_of_processed_events == 1

def test_setup_raises_fatal_output_error_on_invalid_config(self):
kafka_config = {"myconfig": "the config", "bootstrap.servers": "testserver:9092"}
kafka_config = {"myconfig": "the config", "bootstrap.servers": "localhost:9092"}
config = deepcopy(self.CONFIG)
config.update({"kafka_config": kafka_config})
connector = Factory.create({"test connector": config})
Expand Down Expand Up @@ -164,3 +164,7 @@ def test_shutdown_logs_and_counts_error_if_queue_not_fully_flushed(self):
self.object.shut_down()
mock_error.assert_called()
self.object.metrics.number_of_errors = 1

def test_health_returns_bool(self):
with mock.patch.object(self.object, "_admin"):
super().test_health_returns_bool()
Loading