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 a deadlocking test with master libgit2 #7179

Merged
merged 1 commit into from
Jul 25, 2019

Commits on Jul 25, 2019

  1. Fix a deadlocking test with master libgit2

    This commit fixes a test in Cargo to work around a seeming regression in
    behavior in libgit2 around HTTP authentication. The expected flow for
    HTTP authentication with git is that git sends an HTTP request and
    receives an "unauthorized" response. It then sends another request with
    authorization information and that's what we're testing is received in
    the our test.
    
    Previously libgit2 would issue a new HTTP connection if the previous one
    was closed, but it looks like changes in libgit2 now require that the
    same HTTP connection is used for the initial request and the subsequent
    request with authorization information. This broke our test since it's
    not using an HTTP compliant server at all and is just some handwritten
    TCP reads/writes. The fix here is to basically stay with handwritten TCP
    reads/writes but tweak how it happens so it's all on the same HTTP/TCP
    connection to match what libgit2 is expecting.
    
    Some extra assertions have also been added to try to prevent deadlocks
    from happening in the future and instead make the test fail fast if this
    situation comes up again.
    alexcrichton committed Jul 25, 2019
    Configuration menu
    Copy the full SHA
    bd7fe89 View commit details
    Browse the repository at this point in the history