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

Make tokio unstable opt in #73

Merged
merged 2 commits into from
Jan 10, 2023
Merged

Make tokio unstable opt in #73

merged 2 commits into from
Jan 10, 2023

Conversation

mcches
Copy link
Contributor

@mcches mcches commented Jan 10, 2023

We use unhandled_panic to forward host software panics
as test failures.

Consider the test:

#[test]
fn panics() -> turmoil::Result {
    let mut sim = turmoil::Builder::new().build();

    sim.host("host", || async {
        tokio::spawn(async { panic!("boom!") });

        future::pending().await
    });

    sim.client("client", async { Ok(()) });

    sim.run()
}

With tokio_unstable the test fails, which can be useful for
uncovering issues early.

Forcing this is a bit invasive for consumers of the crate, so
instead we make it enabled conditionally.

We use `unhandled_panic` to forward host software panics as test
failures.

Forcing this is a bit invasive for consumers of the crate, so
instead we make it enabled conditionally.
@LucioFranco LucioFranco merged commit fcf338e into main Jan 10, 2023
@mcches mcches deleted the unstable branch January 10, 2023 19:45
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

Successfully merging this pull request may close these issues.

2 participants