Skip to content

net-utils: clean up deprecated methods and update unit tests #7508

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fkouteib
Copy link

Problem

Several methods in net-utils have been deprecated and replaced by methods in net-utils::sockets. However, the unit tests all still called the deprecated methods.

Summary of Changes

  • Remove all deprecated code in net utils that's deprecated as of v2.3.2.
  • Update unit tests to use the new net-utils::sockets methods adn structs.
  • Fix test_bind() to adapt to re-use port flag no longer being set explicitly and directly in socket config.
  • Retire test_multi_bind_in_range_with_config_reuseport_disabled() as it's no longer valid.

)
.is_err());
}

#[test]
Copy link
Author

Choose a reason for hiding this comment

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

This test is no longer valid. We don't have direct/explicit control over setting/clearing re-use port flag. So multi-bind_*() always enables the re-use port and we can't test the combo desired in this test (multi-bind+re-use disabled).

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.3%. Comparing base (5f8b706) to head (d112fd4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #7508    +/-   ##
========================================
  Coverage    83.3%    83.3%            
========================================
  Files         810      810            
  Lines      364817   364639   -178     
========================================
- Hits       304147   304056    -91     
+ Misses      60670    60583    -87     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alexpyattaev
Copy link

Unfortunately the deprecation backport got stuck in review limbo so we can not actually axe these functions now #6705 . Since 3.0 is about to get cut it is probably worth changing these to deprecated in 3.0 and also kill that backport PR.

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