LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
624 stars 72 forks source link

use hyperium/http instead of http-rs/http-types #128

Closed flisky closed 10 months ago

flisky commented 1 year ago

Fix #123

Please attention: the exported types Method / HeaderValues make this a breaking change.

By the way, hyper v1.0 will remove hyper::Body, but I think it's fine to keep it for now?


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

flisky commented 1 year ago

friendly ping

LukeMathWalker commented 1 year ago

friendly ping

Friendly tip: never, ever, do this on an OSS project tracker 😄

I review PRs when I have the capacity to, pinging me doesn't make me review it any sooner.

jplatte commented 1 year ago

friendly ping

Friendly tip: never, ever, do this on an OSS project tracker 😄

While I agree that the above ping 2d after the last update was not very helpful, as a maintainer of many projects I want to note that forgetting about a PR is a thing I've been glad that people pinged me after a few weeks of inactivity on multiple occasions.

LukeMathWalker commented 1 year ago

friendly ping

Friendly tip: never, ever, do this on an OSS project tracker 😄

While I agree that the above ping 2d after the last update was not very helpful, as a maintainer of many projects I want to note that forgetting about a PR is a thing I've been glad that people pinged me after a few weeks of inactivity on multiple occasions.

A few weeks is fine, but 2 days is not—I don't even ping co-workers that soon 😅

LukeMathWalker commented 11 months ago

This looks good to go, just some conflicts to resolve—thanks for the work! I want to wait for hyper to push 1.0 out before merging and releasing this though.

LukeMathWalker commented 10 months ago

Both hyper and http cut 1.0—let's update and then we can merge and release!

flisky commented 10 months ago

Glad to hear! Will give it a try on this weekends.

flisky commented 10 months ago

So here is the hyper v1 upgrade.

However, I have to use a multi-threaded runtime to run the tests (see my last commit). The spawn_local is just not scheduled at all even for a single testcase.(It's okay if I use tokio::net::TcpListener from top to down.) I take hours to investigate, but no clue. Could you give some sight, please? @LukeMathWalker @jplatte Thanks!

LukeMathWalker commented 10 months ago

I discovered a while ago that converting a std TcpListener into a tokio TcpListener won't set it to non-blocking. I wonder if that's the issue here?

flisky commented 10 months ago

Yes, it's exactly the problem! I push another commit to switch back to single-thread runtime, thanks!