Skip to content

WIP: Added context support and tests for Subscription#118

Closed
intojhanurag wants to merge 2 commits intosamber:mainfrom
intojhanurag:feature/context-unsubscribe
Closed

WIP: Added context support and tests for Subscription#118
intojhanurag wants to merge 2 commits intosamber:mainfrom
intojhanurag:feature/context-unsubscribe

Conversation

@intojhanurag
Copy link
Copy Markdown

fixes: #115

image

@intojhanurag
Copy link
Copy Markdown
Author

Hey @samber , It is ready for review.

@samber
Copy link
Copy Markdown
Owner

samber commented Oct 15, 2025

In your implementation, there is currently no context propagation.

I think you should find a clever way to return either Teardown or TeardownWithContext types in operators. If not possible, return only TeardownWithContext and propagate context.

@samber samber added core Changes affecting the core logic or main components of the project, in root/internal/testing pkg breaking change Introduces changes that break backward compatibility or alter the public API. labels Oct 15, 2025
@intojhanurag
Copy link
Copy Markdown
Author

intojhanurag commented Oct 16, 2025

Hey @samber , Can you review my latest approach?

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 29.03226% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.75%. Comparing base (96b598c) to head (fc2a026).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
subscription.go 29.03% 65 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #118      +/-   ##
==========================================
- Coverage   62.28%   61.75%   -0.54%     
==========================================
  Files          76       76              
  Lines        9485     9554      +69     
==========================================
- Hits         5908     5900       -8     
- Misses       3492     3568      +76     
- Partials       85       86       +1     
Flag Coverage Δ
unittests 61.75% <29.03%> (-0.54%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samber
Copy link
Copy Markdown
Owner

samber commented Oct 19, 2025

Create a unit test for context propagation on unsubscription and you will understand why this PR is not finished.

@intojhanurag
Copy link
Copy Markdown
Author

Create a unit test for context propagation on unsubscription and you will understand why this PR is not finished.

Make sense :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that break backward compatibility or alter the public API. core Changes affecting the core logic or main components of the project, in root/internal/testing pkg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Teardown: Add a variant receiving context as parameter

3 participants