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

Support for async tests #9

Open
hberntsen opened this issue May 15, 2020 · 1 comment · May be fixed by #10 or #11
Open

Support for async tests #9

hberntsen opened this issue May 15, 2020 · 1 comment · May be fixed by #10 or #11

Comments

@hberntsen
Copy link

The rusty_fork_test! macro does not accept async fn. I need to test some async functions that share global data structures. It would be very useful that this could be done via rusty-fork :).

@mrcnski
Copy link

mrcnski commented Oct 30, 2023

I wouldn't be surprised if there were some tricky corner cases with this. For now the obvious workaround works:

let rt  = tokio::runtime::Runtime::new().unwrap();
rt.block_on(async {
    [...]
})

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