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

[#serial] not respected with tokio::test? #121

Closed
schulte-lukas opened this issue Nov 4, 2024 · 2 comments
Closed

[#serial] not respected with tokio::test? #121

schulte-lukas opened this issue Nov 4, 2024 · 2 comments

Comments

@schulte-lukas
Copy link

Is it possible that [#serial] is not respected when using Tokio? I have a test definition as below (many in fact, which should be run one at-a-time). Each test is resource intensive and should be run in serial. But, all tests are run simultaneously - machine runs out of memory and kills the process. When running each test individually via command-line, everything stays in limits and all tests pass.

OS: ubuntu 20.04

#[tokio::test(flavor = "multi_thread")]
#[serial(slt)]
async fn some_test_of_mine() -> CliResult<()> {
    ...
}

#[tokio::test(flavor = "multi_thread")]
#[serial(slt)]
async fn another_test_of_mine() -> CliResult<()> {
    ...
}

...
@schulte-lukas
Copy link
Author

Solved a different way...

palfrey added a commit that referenced this issue Nov 27, 2024
Because #121 flagged a possible issue
@palfrey
Copy link
Owner

palfrey commented Nov 27, 2024

Finally got to this one. So, there shouldn't be anything odd there. If it was running multi-process maybe, but multi-thread should just be fine. #122 adds explicit testing to this just in case, but I'm not able to reproduce the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants