Skip to content

Commit

Permalink
Use latest docker image for kafka everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Nov 9, 2023
1 parent 12bf063 commit 80ced22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/stream_calc/sc_tests/integration/test_event_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from testcontainers.kafka import KafkaContainer

from hexkit.custom_types import JsonObject
from hexkit.providers.akafka.containers import DEFAULT_IMAGE as KAFKA_IMAGE
from stream_calc.config import Config
from stream_calc.main import main

Expand Down Expand Up @@ -200,7 +201,7 @@ async def test_receive_calc_publish(cases: list[Case] = deepcopy(CASES)):
the results.
"""

with KafkaContainer() as kafka:
with KafkaContainer(image=KAFKA_IMAGE) as kafka:
kafka_server = kafka.get_bootstrap_server()

submit_test_problems(cases, kafka_server=kafka_server)
Expand Down
5 changes: 3 additions & 2 deletions src/hexkit/providers/akafka/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from testcontainers.kafka import KafkaContainer

from hexkit.custom_types import Ascii, JsonObject, PytestScope
from hexkit.providers.akafka.containers import DEFAULT_IMAGE as KAFKA_IMAGE
from hexkit.providers.akafka.provider import (
ConsumerEvent,
KafkaConfig,
Expand Down Expand Up @@ -324,7 +325,7 @@ async def __aenter__(self) -> "EventRecorder":
return self

async def __aexit__(self, error_type, error_val, error_tb):
"""Stop recording and check the recorded events agains the expectation when
"""Stop recording and check the recorded events against the expectation when
exiting the context block.
"""
await self.stop_recording()
Expand Down Expand Up @@ -403,7 +404,7 @@ async def kafka_fixture_function() -> AsyncGenerator[KafkaFixture, None]:
**Do not call directly** Instead, use get_kafka_fixture()
"""
with KafkaContainer(image="confluentinc/cp-kafka:5.4.9-1-deb8") as kafka:
with KafkaContainer(image=KAFKA_IMAGE) as kafka:
kafka_servers = [kafka.get_bootstrap_server()]
config = KafkaConfig( # type: ignore
service_name="test_publisher",
Expand Down

0 comments on commit 80ced22

Please sign in to comment.