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

Use httpx as client on WebSocket tests #2012

Closed
Kludex opened this issue Jun 20, 2023 · 5 comments
Closed

Use httpx as client on WebSocket tests #2012

Kludex opened this issue Jun 20, 2023 · 5 comments

Comments

@Kludex
Copy link
Sponsor Member

Kludex commented Jun 20, 2023

The idea would be to eliminate websockets client from the test suite, and use what is described here: encode/httpx#304 (comment)

The motivation is to simplify the test suite.

Important

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@kaypee90
Copy link
Contributor

@Kludex is the idea to use this kind of implementation https://gist.github.com/tomchristie/3293d5b118b5646ce79cc074976744b0 for the WebSocket tests

@Kludex
Copy link
Sponsor Member Author

Kludex commented Aug 16, 2023

Yes. Some tweak is needed to use app=app.

@kaypee90
Copy link
Contributor

kaypee90 commented Sep 4, 2023

@Kludex app is passed to the config like this

config = Config(
        app=app,
        ws=ws_protocol_cls,
        http=http_protocol_cls,
        lifespan="off",
        port=unused_tcp_port,
    )

Which is then passed to run_server async with run_server(config):
No sure why you need app=app for this

@likecodingloveproblems
Copy link

I have opened a PR for this issue

@Kludex
Copy link
Sponsor Member Author

Kludex commented Feb 10, 2024

Let's continue with the current setup. I thought the test suite would be simplified, but that's not the case.

@Kludex Kludex closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants