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

test is started 2 times using #[tokio::test] #51

Closed
radumarias opened this issue May 12, 2024 · 1 comment
Closed

test is started 2 times using #[tokio::test] #51

radumarias opened this issue May 12, 2024 · 1 comment

Comments

@radumarias
Copy link

radumarias commented May 12, 2024

If I run this test it starts 2 times

#[tokio::test]
#[test_log::test]
async fn test1() {
    println!("test1");
}
❯ /usr/bin/cargo test --color=always --package rencfs --lib mycrate::test::test1 --no-fail-fast -- --exact -Z unstable-options --show-output
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.13s
     Running unittests src/lib.rs (target/debug/deps/rencfs-849516a3acb9b327)

running 2 tests
test encryptedfs::test::test1 ... ok
test encryptedfs::test::test1 ... ok

successes:

---- encryptedfs::test::test1 stdout ----
test1

---- encryptedfs::test::test1 stdout ----
test1


successes:
    encryptedfs::test::test1
    encryptedfs::test::test1

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 11 filtered out; finished in 0.00s
@d-e-s-o
Copy link
Owner

d-e-s-o commented May 18, 2024

It should work as expected once #46 is merged. Until then the expected syntax is

  #[test_log::test(tokio::test)]

@d-e-s-o d-e-s-o closed this as completed May 18, 2024
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