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

feat(TestStreamClient): support custom classes for test consumers and producers #166

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

JeroennC
Copy link
Contributor

Useful for more control of testing behavior in our test suite.
Specifically using this to implement a "StoppableTestConsumer" which can be interrupted during the .getone() call from the outside.
This is required to test the graceful shutdown behaviour we've implemented.

Next to that it allows overriding when the queue.task_done() is called, to make TopicManager.join() wait for all events to be fully processed before continuing to stop the stream engine. This prevents us from requiring sleep calls in our tests

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2898233) 96.09% compared to head (0ea7aba) 96.10%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #166   +/-   ##
=======================================
  Coverage   96.09%   96.10%           
=======================================
  Files          23       23           
  Lines         845      847    +2     
=======================================
+ Hits          812      814    +2     
  Misses         33       33           
Flag Coverage Δ
unittests 96.10% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@woile woile merged commit bf4a94b into kpn:master Jan 29, 2024
7 of 8 checks passed
@woile
Copy link
Member

woile commented Jan 29, 2024

Thanks!

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.

2 participants