-
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
fix test suite #1341
fix test suite #1341
Conversation
3e6ff84
to
ef589ce
Compare
let major_version = first.parse::<i32>().unwrap(); | ||
|
||
Ok(major_version) | ||
} |
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.
We should actually be receiving this information already when establishing the connection, so we could just save this info in the connection when we receive it and then this can be a simple getter.
It'll be in ParameterStatus
messages which the server sends unprompted on startup, and which we currently ignore: https://github.com/launchbadge/sqlx/blob/master/sqlx-core/src/postgres/connection/stream.rs#L107
https://www.postgresql.org/docs/13/protocol-flow.html#PROTOCOL-ASYNC
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.
Nice. It looks like this is the approach taken by @AtkinsChang in #1346. Do you want me to backport that into this PR, or wait for @AtkinsChang to clean this approach up in his rebased branch?
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.
I had them rebase on yours already so merging that should merge both.
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.
Closing in favor of #1346 |
Sorry that I didn't find there is a duplicated PR |
The test suite seems to be broken on master. I've added a bare-bones README.md with instructions for running tests, and fixes for the issues I encountered. I'm new to Rust and the ecosystem, so I'd appreciate any feedback, even minor nitpicks on things that can be handled better or more idiomatically.
It doesn't appear that the default features are a compilable/testable configuration since support for a specific async runtime is now required. I've updated the suite to removed that default
cargo c
run, and added additional runs to cover the specific async runtimes.A MYSQL test has a deadlock because it inserts many rows with the same key. The fix is to let the key be auto-generated to avoid lock conflicts on the rows.
A Postgres test for composite domain types is not supported for all versions of Postgres that are tested. The fix is to only run the test against newer versions of Postgres which support the feature.
A Postgres test for the macaddr type incorrectly type casts to
inet
in SQL, which is invalid.docker.py
referencessys
but doesn't import it, which results in an error.