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

Fix timeout testing #2418

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Commits on Sep 11, 2024

  1. tests: bypass the proxy when testing timeouts

    If an explicit proxy is configured in the environment, the timeout tests
    will actually go through it, and then the test results will depend on
    the proxy's performance, which can vary.
    
    Testing this is very simple:
    ```
    export http_proxy="http://127.0.0.1:1234"
    cargo test timeouts
    ```
    
    We're hitting this issue in the Ubuntu CI. Further investigations
    after 892569e seemed to point that
    **sometimes**, the proxy would be too slow (particularly on non amd64
    architectures), leading to the tests to actually timeout and pass.
    Hyask committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    57b6659 View commit details
    Browse the repository at this point in the history
  2. tests: use a documented test network for testing

    10.255.255.0/24 is part of 10.0.0.0/8 and reserved for "Private Use" by
    IANA [1]. That means that those IP might be in use in some internal
    networks, making the timeout tests to fail on those networks.
    One example of such network is the Ubuntu testing infrastructure.
    
    Changing for a documented "Test network", that is supposed to never be
    routable [2] makes the tests to have a better chance to pass in most
    network contexts.
    
    [1]: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
    [2]: https://www.rfc-editor.org/rfc/rfc5737.html
    Hyask committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    342d2cd View commit details
    Browse the repository at this point in the history