-
Notifications
You must be signed in to change notification settings - Fork 471
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
Add a websockets tunnel and a test for the proxy's websockets support. #3823
base: main
Are you sure you want to change the base?
Conversation
So, this doesn't actually reproduce the bug I wanted to test with this, so this isn't as useful as I thought. But since I wrote it, here's a PR. Should we commit this anyway, or find some other testing strategy? |
e58b64a
to
ee74198
Compare
Nice! But as you said, it is more useful to test real js client, so let's add something similar to what Stas did at sk/proxy-wss-test-wip branch to |
This test looks like a nice way to test basic websocket proxy logic without a dependency on Docker/NodeJS/console. Even if it doesn't reproduce a bug that we have, I think it still will be useful to have such a test. Also, wanted to look at the logs, but it seems that currently test doesn't work in CI:
|
+1 good to have it in the CI. I was thinking about a similar setup with python test calling |
@conradludgate I just remembered this PR. I don't know what we should do with it, and I don't plan to work on it anymore. But maybe you find it useful? If not, feel free to close it. |
Thanks, I'll take a look |
Ah yes this will be very useful. I was looking to add some websocket tests last week, glad I checked my notifications again. I'll sort out this PR and merge it in. Thanks! |
ee74198
to
9594763
Compare
7293 tests run: 6929 passed, 0 failed, 364 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
6fc1a82 at 2025-01-10T17:51:08.619Z :recycle: |
This PR has been automatically marked as Draft because it was last updated 450 days ago. Please, consider closing it if it's not needed anymore. |
For testing the proxy's websockets support. I wrote this to test #3822. Unfortunately, that bug can *not* be reproduced with this tunnel. The bug only appears when the client pipelines the first query with the authentication messages. The tunnel doesn't do that.
9594763
to
cb32117
Compare
from fixtures.log_helper import log | ||
|
||
# Enable verbose logging of all the traffic | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a nit: it seems like we a couple of extra lines here
For testing the proxy's websockets support.
I wrote this to test #3822. Unfortunately, that bug can not be reproduced with this tunnel. The bug only appears when the client pipelines the first query with the authentication messages. The tunnel doesn't do that.
Update (@conradludgate 2025-01-10):
We have since added some websocket tests, but they manually implemented a very simplistic setup of the postgres protocol. Introducing the tunnel would make more complex testing simpler in the future.