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

All await calls treated as "missed lines" #1547

Open
Sajjon opened this issue May 14, 2024 · 0 comments
Open

All await calls treated as "missed lines" #1547

Sajjon opened this issue May 14, 2024 · 0 comments
Assignees

Comments

@Sajjon
Copy link

Sajjon commented May 14, 2024

I'm using tarpaulin version 0.30.0 and have just introduced a lot of async code in my PR which results in ~70 falsely flagged "missed lines", see PR https://github.com/radixdlt/sargon/pull/131/checks?check_run_id=24955855717 or view in CodeCov (after you have signed in):
https://app.codecov.io/gh/radixdlt/sargon/pull/131/blob/src/system/sargon_os/sargon_os_profile.rs

Screenshot 2024-05-14 at 17 01 57

I have unit tests covering all lines, implemented with actix_rt::test, .e.g:

   #[actix_rt::test]
    async fn test_import_profile_is_current_by_id() {
        // ARRANGE
        let os = SUT::fast_boot().await;
        let p = Profile::sample();

        // ACT
        os.with_timeout(|x| x.import_profile(p.clone()))
            .await
            .unwrap();

        // ASSERT
        assert_eq!(os.profile().id(), p.id());
    }

I really love tarpaulin, it is very accurate, but it is quite unfortunate to get 60 falsly flagged missed lines. Hmm, any recommendations? Is await lines not supported to be counted?

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