Tom

Results 281 comments of Tom

Hi @shorea. I didn't forget about this, but it's not simple to mitigate the real problem here. Lately I'm working to push a new product to production and unfortunately I...

Glad to hear news about this. Honestly, I haven't had time to dig into this, so I appreciate your update. Initially I didn't thought it was directly related to GC/memory...

Check out: [gock.Remove(mock)](https://github.com/h2non/gock/blob/master/store.go#L51)

Make sure your Consul code/client `http.Client` is being explicitly intercepted by `gock`. You have an example here about how to intercept a custom `http.Client` instance: https://github.com/h2non/gock/blob/master/_examples/custom_client/client_test.go#L20

Can you provide the error trace or a code snippet to reproduce it?

You can use the `Delay(duration)` method: https://godoc.org/github.com/h2non/gock#Response.Delay Alternatively, you can simulate the native timeout error via: https://godoc.org/github.com/h2non/gock#Response.SetError

It depends on what type of error you want to simulate. If you simply want to test the error handling for a timeout-like situation, that's fine.

Adding an example file [here](/h2non/gock/tree/master/_examples) should be fine. Feel free to send a PR!

HTTP/2.0 should be transparently and implicitly supported. gock works at higher level than L7, then no network layer is actually involved. Are you having any troubles?

You should not enable the real networking mode if the requests you are testing are not valid network reachable hosts unless you want to explicitly test that scenario. Simply ignore...