Add test for udp socket reachability#6676
Conversation
| let mut udp_sockets = Vec::new(); | ||
| for _ in 0..MAX_PORT_VERIFY_THREADS * 2 { | ||
| let (_p1, (sock_a, _tl_a)) = | ||
| bind_common_in_range_with_config(ip_a, (3000, 4000), config).unwrap(); |
There was a problem hiding this comment.
would be nice if these used the ports from reserved range too. you can call localhost_port_range_for_tests multiple times if needed it will yield more unique ranges. Otherwise this test might flake due to silly port conflicts.
| for _ in 0..MAX_PORT_VERIFY_THREADS { | ||
| let (_p1, (sock_a, _tl_a)) = bind_common_in_range_with_config( | ||
| ip_a, | ||
| sockets::localhost_port_range_for_tests(), |
There was a problem hiding this comment.
You really do not need to run this so many times, each range has 20 IPs, but calling these in a loop exhausts the quota for the unittest. You can use fewer iterations here (I do not think we even need the for loop on line 1000) or allocate one range for both binds within the loop (so you are using less ranges).
ba0f73d to
63afe7d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6676 +/- ##
=======================================
Coverage 83.4% 83.4%
=======================================
Files 850 850
Lines 377876 377916 +40
=======================================
+ Hits 315320 315388 +68
+ Misses 62556 62528 -28 🚀 New features to boost your workflow:
|
Problem
Follow up to: #6611
I forgot to add a test to check that the new udp reachability function properly works with multiple IPs
Summary of Changes
add test to make sure the updated udp reachability function works properly