-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
test interleaved reading of result streams #972
test interleaved reading of result streams #972
Conversation
To run this test, use: cargo test --release --features postgres,runtime-actix-rustls -- --ignored --nocapture pool_interleave_test Note that --release and a multi threaded runtime are required to reproduce #886 in other tests. |
This is a re-write of the test for the error:
this occurs (for me) only when a specific non-default connection option is set:
I've renamed the test to: drop_query_test run it using:
|
Correction, to run it you also need the 'json' feature:
|
love the test work here @rich-murphey marking as draft though as we don't want to merge this as-is. we'll want to cherry-pick these tests into |
I'm also OK with closing this and re-submittng for the branch 'next' when the time is right. |
Agreed. Great work so far but we should get this on
It's hard to trigger the source problem in Postgres. This is because Postgres has a mostly sane and stateless protocol. The future has to be dropped at just the right time. |
This tests tries to induce interleaved reading of result streams.
The test:
creates a pool of 90 connections. (postgres default max is 100).
spawns 180 threads that read a table of 100 rows.
in each thread:
collect a stream of results to an array.
for each item in the stream, wait one millisecond (the tokio sleep granularity).
The wait should induce interleaved reading of result streams.
The intent here was to try to reproduce postgres null MessageFormat errors; however, the test shows no such errors.