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

Update how DLQ subscriber is instantiated (GSI-1274) #150

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

TheByronHimes
Copy link
Member

@TheByronHimes TheByronHimes commented Jan 14, 2025

The use case for the DLQ subscribers involves using many of them at once, for which the construction model of the regular KafkaEventSubscriber is ill-suited. This PR ditches the construct method in favor of a normal __init__ and explicit start(), stop(). I also included the async context manager functions (__aenter__()/__aexit__()) to call start and stop since this is helpful for tests where there might only be one subscriber.

I also updated test_dlqsub.py to use the blanket pytestmark since there was only one sync function.

src/hexkit/providers/akafka/provider/eventsub.py Outdated Show resolved Hide resolved
tests/integration/test_dlqsub.py Outdated Show resolved Hide resolved
tests/integration/test_dlqsub.py Show resolved Hide resolved
@TheByronHimes TheByronHimes merged commit c9ecffd into main Jan 15, 2025
8 checks passed
@TheByronHimes TheByronHimes deleted the feature/better_dlqsub_init branch January 15, 2025 07:50
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12783730628

Details

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 92.242%

Totals Coverage Status
Change from base Build 12763147213: 0.1%
Covered Lines: 2057
Relevant Lines: 2230

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants