Skip to content

Hypercorn test server #290

Closed
Closed

Description

@pgjones

Hello,

Would you be receptive to me adding Hypercorn as a test server (alongside Uvicorn)? I think for this project it would be good to test HTTP/2 against a production server. Whilst for Hypercorn it would be great to know that it doesn't upset this client.

Activity

  1. florimondmanca commented on Aug 28, 2019

    @florimondmanca
    Contributor

    We might benefit from this in #276 as well.

    Let’s first refactor the current server setup as mentioned in #276 (comment), and then perhaps consider this?

  2. pgjones commented on Aug 28, 2019

    @pgjones
    Author

    ok, sounds good.

  3. florimondmanca commented on Aug 28, 2019

    @florimondmanca
    Contributor

    Hmm... Sorry that my previous message didn’t sound as excited as I am about this idea!

    If you want to put together a PR demonstrating the idea it would be great, no need to wait for the refactor I mentioned to be done — you may have to deal with conflicts, but that’s about it. Thanks for suggesting this!

  4. florimondmanca commented on Aug 29, 2019

    @florimondmanca
    Contributor

    @pgjones FYI, the test server refactoring I mentioned earlier is in. 👍

  5. lovelydinosaur commented on Sep 2, 2019

    @lovelydinosaur
    Member

    If we're able to run the tests against both hypercorn & uvicorn, then that seems like it might be a nice bit of progress yeah.

  6. lovelydinosaur commented on Dec 21, 2019

    @lovelydinosaur
    Member

    It's possible that I've been overzealous wrt. "it'd be easier to manage for encode if we're using an encode server". I'm wondering if there's actually blockers there, of if that's just me being closed-minded.

    • Would there be any issues wrt. differing supported Python versions that could make this problematic for us?
    • If we did want to do this, I'd rather we just switched away from uvicorn completely.
    • I guess if possible it might be sensible for the majority of tests to just run against a server instance that's setup in a seperate thread and that is available throughout the entire test suite lifetime. (?)
  7. florimondmanca commented on Dec 21, 2019

    @florimondmanca
    Contributor

    a server instance that's setup in a seperate thread and that is available throughout the entire test suite lifetime

    FWIW that's already what we've got — up to 4 servers, i.e. one for {HTTP, HTTPS} x {TCP, UDS}, running in their own thread and available throughout the test session. (We might be able to reduce to 2 by having servers support both HTTP and HTTPS, though?)

  8. pgjones commented on Jan 4, 2020

    @pgjones
    Author

    If you do wish to use Hypercorn you can have a single instance serve HTTP, HTTPS, TCP, UDP, h11, h2, h3 at once.

  9. lovelydinosaur commented on Jan 6, 2020

    @lovelydinosaur
    Member

    @pgjones Good to know, thanks.

    I guess the main criteria we'd want for figuring if this'd be a good idea would be:

    • Is there any issue with versioning incompatabilities that could be problematic for us here?
    • Does any PR introducing hypercorn make the test code simpler or not?
  10. florimondmanca commented on Mar 13, 2020

    @florimondmanca
    Contributor

    Hey, so I'm going to proactively close this as time has sort of proven that we're at least good enough with the current setup. Sure, it'd be nice to have a local HTTP/2 server to test against, but I'm not sure we'd actually catch more bugs just by having that vs by testing more cases (eg replicating #514). So… Closing for housekeeping. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    http/2Issues and PRs related to HTTP/2toolingChanges to our CI/CD, tests setup, etc.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions