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

test: replace net2 dependency with socket2 #635

Merged
merged 1 commit into from
Aug 24, 2020
Merged

test: replace net2 dependency with socket2 #635

merged 1 commit into from
Aug 24, 2020

Commits on Aug 24, 2020

  1. test: replace net2 dependency with socket2

    The proxy's integration tests depend on the `net2` crate, which has been
    deprecated and replaced by `socket2`. Since `net2` is no longer actively
    maintained, `cargo audit` will warn us about it, so we should replace it
    with `socket2`.
    
    While I was making this change, I was curious why we were manually
    constructing and binding these sockets at all, rather than just using
    `tokio::net::TcpListener::bind`. After some archaeology, I determined
    that this was added in linkerd/linkerd2#952, which added a test that
    requires a delay between when a socket is _bound_ and when it starts
    _listening_. `tokio::net::TcpListener::bind` (as well as the `std::net`
    version) perform these operations together. Since this wasn't obvious
    from the test code, I went ahead and moved the new `socket2` version of
    this into a pair of functions, with comments explaining why we didn't
    just use `tokio::net`.
    
    Fixes linkerd/linkerd2#4891
    hawkw committed Aug 24, 2020
    Configuration menu
    Copy the full SHA
    0b0999c View commit details
    Browse the repository at this point in the history