You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove/replace tests running against graphhopper.com #1986
GraphHopperMatrixIT and GraphHopperWebIT are running against the public GH service, but I think this not ideal. If they fail its often because of some data changes and nothing can be done here in the open source project except fixing the expected values.
What should be tested (instead):
test that GraphHopper(Matrix)Web is sending the right requests (no need to actually send the requests to graphhopper.com for this). Either just unit test the methods that create the request from GH(Matrix)Request or do as its done right now but send the requests to some test server on localhost.
test the way the (hosted) GH server answers certain requests (but that should not happen here in the open source project).
Isn't this the same as we currently do with RouteResourceTest etc. but instead of using DropwizardRule#app.client() we use GraphHopperWeb to send the request?
so that we know that the client is "really working".
I think having a few such integration tests makes sense, but for more exhaustive testing I think its better to have unit tests testing GraphHopperWeb#createGet/PostRequest.
Isn't this the same as we currently do with RouteResourceTest etc. but instead of using DropwizardRule#app.client() we use GraphHopperWeb to send the request?
Yes, probably we should use our client to do these requests :)
Yes, probably we should use our client to do these requests :)
Hm, not sure because we want to test the server functionality independent from the client (because the client-hc is not the only way to query the web api). Then again it would be handy sometimes especially because it provides a simple way to send GET and POST... But what I wanted to say here is that having a test that does use client-hc against localhost should work just like we did the RouteResource tests so far?
But what I wanted to say here is that having a test that does use client-hc against localhost should work just like we did the RouteResource tests so far?
Converting GraphHopperWebIT is not 100% straight forward as it runs queries in very different locations and we would need multiple test maps to cover them all. Then again GraphHopperWebIT should not even test anything too specific and I think the tests can either be removed or be converted so they are all running on one of the test maps we already use in the repo.
Activity
easbar commentedon Apr 14, 2020
I just fixed the expected distance here again:
And it seems odd that only the distance (but not the weight) changed. Here is the route:
https://graphhopper.com/maps/?point=51.467697%2C-0.090637&point=51.521241%2C-0.171833&locale=en-us&vehicle=car&weighting=fastest&turn_costs=true&use_miles=false&layer=Omniscale
Note that the route looks a bit weird towards the end:
easbar commentedon Apr 14, 2020
Seems to be a mapping error, take a look at the different layers:
[-]Remove/replace tests against graphhopper.com[/-][+]Remove/replace tests running against graphhopper.com[/+]karussell commentedon Apr 16, 2020
I removed the matrix tests that goes to graphhopper.com: a5ca5ff
The other tests I would not want to remove but to replace them with local queries so that we know that the client is "really working".
easbar commentedon Apr 16, 2020
Isn't this the same as we currently do with
RouteResourceTestetc. but instead of usingDropwizardRule#app.client()we useGraphHopperWebto send the request?I think having a few such integration tests makes sense, but for more exhaustive testing I think its better to have unit tests testing
GraphHopperWeb#createGet/PostRequest.karussell commentedon Apr 16, 2020
Yes, probably we should use our client to do these requests :)
easbar commentedon Apr 16, 2020
Hm, not sure because we want to test the server functionality independent from the client (because the client-hc is not the only way to query the web api). Then again it would be handy sometimes especially because it provides a simple way to send GET and POST... But what I wanted to say here is that having a test that does use client-hc against localhost should work just like we did the RouteResource tests so far?
karussell commentedon Apr 16, 2020
Ok
Yes
easbar commentedon Apr 18, 2020
Converting
GraphHopperWebITis not 100% straight forward as it runs queries in very different locations and we would need multiple test maps to cover them all. Then againGraphHopperWebITshould not even test anything too specific and I think the tests can either be removed or be converted so they are all running on one of the test maps we already use in the repo.karussell commentedon Apr 18, 2020
Yeah, moving everything into one region is fine. I'll take over here and see if I can avoid removing too much coverage.
karussell commentedon Mar 27, 2023
Was fixed