Skip to content

Remove/replace tests running against graphhopper.com #1986

Closed

Description

@easbar

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).

Activity

  1. easbar commented on Apr 14, 2020

    @easbar
    MemberAuthor

    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

    image

    Note that the route looks a bit weird towards the end:

    image

  2. easbar commented on Apr 14, 2020

    @easbar
    MemberAuthor

    Seems to be a mapping error, take a look at the different layers:

    image

    image

    image

  3. changed the title [-]Remove/replace tests against graphhopper.com[/-] [+]Remove/replace tests running against graphhopper.com[/+] on Apr 14, 2020
  4. karussell commented on Apr 16, 2020

    @karussell
    Member

    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".

  5. easbar commented on Apr 16, 2020

    @easbar
    MemberAuthor

    but to replace them with local queries

    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.

  6. karussell commented on Apr 16, 2020

    @karussell
    Member

    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 :)

  7. easbar commented on Apr 16, 2020

    @easbar
    MemberAuthor

    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?

  8. karussell commented on Apr 16, 2020

    @karussell
    Member

    Ok

    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?

    Yes

  9. easbar commented on Apr 18, 2020

    @easbar
    MemberAuthor

    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.

  10. karussell commented on Apr 18, 2020

    @karussell
    Member

    Yeah, moving everything into one region is fine. I'll take over here and see if I can avoid removing too much coverage.

  11. self-assigned this
    on Apr 18, 2020
  12. karussell commented on Mar 27, 2023

    @karussell
    Member

    Was fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions