Skip to content

Conversation

@twz123
Copy link
Contributor

@twz123 twz123 commented Dec 22, 2025

This will properly pass on cancellation requests, and reduce usage of a deprecated method.

See:

RELEASE NOTES: none

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.37%. Comparing base (319a0fa) to head (7965ceb).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8788      +/-   ##
==========================================
+ Coverage   83.33%   83.37%   +0.03%     
==========================================
  Files         418      418              
  Lines       32910    33007      +97     
==========================================
+ Hits        27424    27518      +94     
- Misses       4088     4090       +2     
- Partials     1398     1399       +1     
Files with missing lines Coverage Δ
internal/testutils/pipe_listener.go 84.61% <100.00%> (+0.83%) ⬆️
test/rawConnWrapper.go 66.10% <100.00%> (+0.28%) ⬆️

... and 34 files with indirect coverage changes

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

@twz123 twz123 force-pushed the test-withcontextdialer branch from debddcb to e5d0794 Compare December 22, 2025 14:43
@mbissa mbissa assigned mbissa and eshitachandwani and unassigned mbissa Dec 24, 2025
dl := pl.Dialer()
conn, err := dl("", time.Duration(0))
dl := pl.ContextDialer()
conn, err := dl(t.Context(), "")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not use t.Context() rather we do something like this :

ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
	defer cancel()

where defaultTestTimeout = 10 * time.Second

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

case <-p.done:
return nil, errClosed
case <-ctx.Done():
return nil, context.Cause(ctx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to return ctx.Err()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@eshitachandwani eshitachandwani added this to the 1.79 Release milestone Jan 2, 2026
This will properly pass on cancellation requests, and reduce usage of a
deprecated method.

Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
@twz123 twz123 force-pushed the test-withcontextdialer branch from e5d0794 to 7965ceb Compare January 5, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants