LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
620 stars 70 forks source link

Support tokio 1.0 #46

Closed wayofthepie closed 3 years ago

wayofthepie commented 3 years ago

With tokio 1.0 released Ive been moving things over to it. It would be good to get wiremock up to 1.0 too. I had a quick look, I think all deps support 1.0 now except async-std. There is a PR for that update in async-std https://github.com/async-rs/async-std/pull/924.

If this is something that you want to do I can take a look at it. Thanks.

LukeMathWalker commented 3 years ago

wiremock does not expose in any way its executor to the user, therefore it should work as is in a codebase that is using tokio 1.0 - did you have issues with it?

Nonetheless, updating was already on my radar (to trim to dependency tree for clients who have already migrated). We are not using the tokio compat feature for async-std (and it is a development dependency), so it is not blocker.

If you want to take a shot at it, go ahead 😁

wayofthepie commented 3 years ago

Ah you're right, I was getting a panic in the tests saying they need to run in a tokio runtime, even though they were. Thought it was a 0.2/1.0 mismatch issue, but that was not wiremock. All is good now. I can still look at this in the next few days if no one else does, would be nice to just pull in one version. Thanks!

LukeMathWalker commented 3 years ago

I might get to work on this today/tomorrow - let's see 😁