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

#[sqlx::test] should play nicely with nextest #2123

Open
DanielJoyce opened this issue Sep 28, 2022 · 5 comments · May be fixed by #3334
Open

#[sqlx::test] should play nicely with nextest #2123

DanielJoyce opened this issue Sep 28, 2022 · 5 comments · May be fixed by #3334
Labels
enhancement New feature or request

Comments

@DanielJoyce
Copy link

Is your feature request related to a problem? Please describe.
Currently running tests annotated with #[sqlx::test] fail with nextest because of how sqlx sets up test dbs, and nextest starts multiple test binaries in parallel to speed up tests

Nextest has real nice reporting features.

Describe the solution you'd like
I can use #[sqlx::test] with nextest

Describe alternatives you've considered
None, because the test binary that has a #[sqlx::test] in it deletes the db on exit, stomping on the next invocation of the binary by nextest

@DanielJoyce DanielJoyce added the enhancement New feature or request label Sep 28, 2022
@dsaghliani
Copy link

This sounds like a relatively simple thing to implement—though I say this without having looked at the source code. Is the reason it has been delayed for so long that few people actually care about it, or do the maintainers disapprove of the change?

If it's the latter, it could be put behind a "nextest" feature flag.

@RigoOnRails
Copy link

Currently using cargo nextest run --retries 1 as a workaround to this, but the tests that initially failed will be reported as flaky.

@khorchanov
Copy link

Unfortunately cargo nextest run --retries 1 is not deterministic and thus not stable for any use in CI ...

@abonander
Copy link
Collaborator

Some discussion in #2640 (comment)

@DerPlayer2001
Copy link

Since #2640 is merged is there any progress on this Issue?

@bonega bonega linked a pull request Jul 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants